"Sooner or later the U.S will make a choice. Either Turkey or FETO," Erdogan said.
"Either the coup-plotting terrorist FETO or the democratic country Turkey. It has to make this choice," he said, referring to the Gulen-led Fetullah Terrorist Organization that Ankara says mounted the bloody coup attempt through rogue elements within the military.
The president's remarks came as he addressed a mass crowd in front of the Presidential Palace in the capital – one location attacked on the night of the coup attempt.
The gathering in Ankara was the last night of daily pro-democracy rallies which has been held since July 15, Erdogan announced.
The daily gatherings, which have attracted hundreds of thousands wishing to show their opposition to the foiled July 15 coup, culminated Sunday in a rally in Istanbul that 5 million people are thought to have attended, according to local officials.
Erdogan warned citizens, however, to stay constantly vigilant as "betrayal can come from anywhere and anyone.
"We want to finalize it here [Ankara]. But, I see that our people do not want to leave the squares," he said.
"Democracy watch cannot be only kept in certain hours, in certain places," he added, and called on Turks to protect "democracy, freedom, the state, and the future" 24 hours a day, 365 days a year.
The Turkish president once more suggested he sees no difference between terrorist groups such as the PKK, Daesh and U.S.-based preacher Fetullah Gulen's FETO.
"Those who follow the Pennsylvania-based charlatan who sold his soul to the devil, or Daesh, which shed Muslim blood, or the PKK that also has shed blood for 30 years to divide the country and the nation, will all lose in the end."
He stressed his "one nation, one flag, one homeland, and one state" slogan.
- Erdogan to approve death penalty if parliament approves
About a possible reinstatement of the death penalty in Turkey for those involved in the defeated coup, Erdogan reiterated his stance that the decision would be left up to Turkish lawmakers in the parliament.
He said he would approve reinstating the death penalty if the parliament approves.
Such a penalty could be imposed on Gulen as well, who is accused of leading a long-running campaign to overthrow the state through the infiltration of Turkish institutions, particularly the military, police and judiciary, forming what is commonly known as the “parallel state”.
Turkey's government said the foiled putsch, which left 240 people martyred and nearly 2,200 injured, was organized by followers of Gulen, who has lived in a self-imposed exile Pennsylvania since 1999.
"We will certainly call the murderers to account [for their crimes]. We will impose the heaviest penalty," said Prime Minister Binali Yildirim, who took the stage late Wednesday to address the crowd before Erdogan.
Praising Turks as "the hero of democracy," Yildirim added: "Coup plotters believed that they would defeat the nation, but they were mistaken."
On the night of the attempt, Erdogan urged Turks to swarm the streets in opposition to the coup, a call that was met with an overwhelming response from thousands who went to defy tanks and bullets in major cities and millions who took part in anti-coup demonstrations across the country.