Conversation so far:
Where was Recep Tayyip Erdoğan elected to first?
The 2002 Turkish general election was the first election in which Recep Tayyip Erdoğan participated as a party leader.
What party was Recep Tayyip Erdoğan with for the 2002 Turkish general election?
Recep Tayyip Erdoğan founded the Justice and Development Party (AKP) in 2001, leading it to election victories in 2002, 2007 and 2011.
Was Recep Tayyip Erdoğan well liked as Prime Minister of Turkey?
On 14 April 2007, an estimated 300,000 people marched in Ankara to protest against the possible candidacy of Recep Tayyip Erdoğan in the 2007 presidential election.

Question: How long was he in power for?
Self-contained rewrite: How long was Recep Tayyip Erdoğan in power as Prime Minister of Turkey for?