ISTANBUL • President Recep Tayyip Erdogan is the most divisive leader in the history of the modern Turkish republic.
Adored by supporters as a transformative figure who modernised Turkey, his foes paint him as an increasingly despotic "Sultan" ruthlessly shutting down any criticism.
His ruling Justice and Development Party, or AK Party, has long been accused of seeking to impose conservative Islamic values on society - a possible point of friction with a military that has long seen itself as the guardian of Turkey's secular state.
Rising from premier to become the nation's first directly elected president in 2014, Mr Erdogan has dreamed of boosting his hold even further by changing the Constitution to give Turkey a US-style executive presidency. But the dramatic events of Friday night have shaken his grip on power in a way few could have imagined even a day earlier.
With a notoriously fiery temper, Mr Erdogan, 61, is known to himself and his followers as the "buyuk usta" - the "big master" - or simply "the Sultan".
This government, brought to power by the people, is in charge.
PRESIDENT RECEP TAYYIP ERDOGAN
Mr Erdogan, who has a degree in business administration, became prime minister in 2003, bringing stability after a history of coups and rocky coalitions and dragging the Muslim-majority country out of an economic quagmire.
He succeeded in clipping the wings of the military by purging elements that he said opposed him.
But ordinary Turks became suspicious of his moves to "Islamicise" society by restricting alcohol sales, curbing the Internet and even trying to ban mixed-sex dormitories at state universities.
Pushing for Turkey to become a top-10 economy by the republic's 100th anniversary in 2023, Mr Erdogan launched a series of breathtakingly ambitious infrastructure projects, including a high-speed rail network and a tunnel under the Bosphorus.
But his vast new US$615 million (S$828 million) presidential palace with 1,150 rooms has been ridiculed as an absurd, tasteless extravagance - a symbol of his creeping authoritarianism and at odds with his humble upbringing. The son of a coast guard officer, he is deeply proud of his roots in a working-class Istanbul suburb.
Mr Erdogan's authoritarianism has seen critics muzzled, with a string of journalists as well as ordinary citizens ending up in court for insulting or slandering him. Critics also accuse him of using the judiciary to silence political opponents, and there have been many allegations of trumped-up charges, according to the BBC.
He has also targeted the military in several cases, leading to jail terms for some senior officers.
The crackdown has earned fierce international criticism for a man initially hailed in the West for creating a model Muslim democracy on Europe's eastern edge.