ANKARA, Turkey — The political career of Yasar Yakis, a former foreign minister of Turkey, offers a telling look at the trajectory of the country’s president, Recep Tayyip Erdogan.

Fifteen years ago, Mr. Yakis was a founding member of Mr. Erdogan’s political group, the Justice and Development Party, or A.K.P. for short. Mr. Yakis was a career diplomat and stalwart of the secular Turkish bureaucracy, and his appointment as foreign minister in 2002 embodied the party’s attempts to appeal beyond its conservative, Islamist base.

But less than four months later, Mr. Yakis lost his cabinet post. In the years since, he has been increasingly at odds with Mr. Erdogan, as the leader’s policies grew increasingly authoritarian.

Mr. Erdogan, Mr. Yakis remarked, once compared democracy with a tram: You can leave it once you reach your stop. Today, Mr. Yakis said, Mr. Erdogan “is not any longer on the tram.”