Civilians then came out onto the streets of Istanbul, Ankara and other cities and confronted the rebellious soldiers, even those who were driving tanks.
The rebels, unwilling to carry out a Tiananmen Square-style massacre, backed down and were eventually arrested by forces loyal to Erdogan, an Islamist who has tried to roll back the secular nature of the modern Turkish state.
One group of soldiers and officers fled by helicopter to Greece. In April, a Greek court refused to extradite three of the soldiers.
Around 250 people died during the two days of the coup, including 67 soldiers and police officers loyal to President Erdogan who have been turned into "martyrs" in the last year.
Colonel Omer Halisdemir, who shot dead rebel General Semih Terzi before being killed by coup plotters, has been turned into a national hero.
In the days, weeks and months since the coup, President Erdogan has claimed it was led by elements within the military who were loyal to Fethullah Gulen, a cleric who was once a close ally of Erdogan, but now lives in exile in the United States.
In January, secret EU intelligence reports claimed Erdogan planned to purge opposition elements from government institutions even before the coup.
British MP David Lammy said the arrest on July 5 of ten human rights activists was the latest evidence of a brutal crackdown by a regime which had become a "dictatorship."
"These human rights activists are just the latest victims of President Erdogan's ruthless crackdown on any opposition voices in Turkey since the failed coup attempt last summer," Mr. Lammy said.
"Opponents have been purged, human rights have been systematically abused, 160 media outlets have been shut down, 150,000 people have been put under investigation and 50,000 people have been put in jail, including over 1,000 elected politicians," he added.
It still remains unclear who led the coup, and why they wanted to oust President Erdogan.
One report, in Iranian media a week after the coup, claimed Russia had warned Turkey.
The coup began with soldiers storming the studio of the Turkish Radio and Television Corporation in Ankara, where a presenter, Tijen Karaş, was forced to read out a statement declaring Turkey to be under the control of the armed forces.
Turkish Air Force jets bombarded the parliament building in Ankara, and several commanders loyal to Erdogan were killed or abducted.
Turkey's Chief of Staff General Hulusi Akar was held for several hours and he has claimed General Hakan Evrim, a rebel air force commander, asked him to speak on the phone with Gulen.
"Hakan Evrim said they could put me on phone with Fethullah Gulen, who he described as their 'opinion leader,' " General Akar said last year.
But the rebels made a schoolboy mistake — they failed to seize the head of state.
Erdogan, who was on holiday on the coast at Marmaris, made the most of his freedom and contacted a journalist and did an interview on Facebook Live, which was broadcast on satellite television.
"These minority soldiers can come with their tanks and cannons. They can do what they want to the public. I don't know any other power which is stronger than public's power… and it's not possible to accept military government," he said.