Editor's note: Viewing this on mobile? Click here to see the infographic.
(CNN) -- Turks have picked prime minister Recep Tayyip Erdogan to be the country's first directly elected president.
Erdogan secured 52% of the votes in the first round of the presidential election, narrowly avoiding a runoff, according to Turkish election board.
Turkey is a parliamentary democracy and the prime minister is the head of its government. The president's role is more formal, and represents the country as the head of the state -- similar to the Queen in the UK.
But Erdogan has already indicated he would like to see more powers being transferred to the presidential palace, speaking about a "new era" in his victory speech.
"With the president elected directly by the citizens, all barriers between the people and the presidential palace have been removed," he was reported as saying in his speech by the Turkish media.
Here is what you need to know about the historic election.
Why does Erdogan want to be president if he is more powerful as prime minister?
The former mayor of Istanbul and the leader and co-founder of the Justice and Development Party (AKP) came to power in 2003 and has been serving his third term as prime minister. While the constitution would have allowed Erdogan to run again when his term finishes next year, his own party rules prohibited him from seeking fourth term.
His transition to presidency was seen as a logical step for a politician who wanted to maintain political power. Karabekir Akkoyunlu, researcher at the London School of Economics, said the country's constitution -- drawn up by the military junta in 1982 -- gave the head of state significant authority.
Erdogan, Akkoyunlu said, would likely push those to the limit by " invoking the 'national will' he claims to embody."
What issues will he face next?
The Kurdish peace process is one of the most pressing issues of the coming months. Turkey passed a law in July establishing a legal framework for peace talks with the Kurdish militants to end three decades of insurgency.
"The Kurdish peace process is also linked with regional dynamics and the rise of the Islamic State, which is now threatening the Kurds in northern Iraq and Syria," Akkoyunlu said.
Erdogan will also have to work with the government in trying to tackle Turkey's economic troubles. The IMF and OECD have both warned Turkey's economy remains vulnerable to dangers outside its borders. High inflation, low employment and the country's chronic inequality are putting it at risk.
Who else was running?
The main opposition parties, the Republican People's Party (CHP) and the Nationalist Movement Party (MHP) had nominated Ekmeleddin Ihsanoglu as their joint candidate. The former secretary general of the Organization of Islamic Cooperation (OIC) was campaigning on the idea of national unity and secured 38% of the vote.
Selahattin Demirtas, a left-wing politician popular with Turkey's Kurdish minority, ran for the Peoples' Democratic Party (HDP) and finished third with 10%. Around 25% of people in Turkey identify themselves as Kurdish.
Why does this matter?
Turkey's geographical position and cultural make-up has contributed to the country being seen as a powerful bridge between Asia and Europe. Its membership of NATO and candidacy to join the European Union reflect its importance.
The country's $800 billion economy is among the 20 biggest in the world and attracts $200 billion in foreign direct investment every year.
Turkey also plays a key role in the Middle East, bordering Syria, Iraq and Iran.