As successor to modern Turkey's revered founder, Mustafa Kemal Ataturk, the president also carries great moral weight.
 
Court appeal
 
The Justice and Development Party was left almost on its own in the assembly as only a few members of opposition parties and some independents turned up to vote.
 
Haluk Koc, A CHP politician, said: "The speaker of parliament did not meet our request for a count of those present in the chamber for the vote.
 
"It is clear there were not the required 367 members present, so we are making our application to the court (to annul the election)."
 
A second round of voting is due on Wednesday.
 
Tension
 
Defenders of Turkey's secular system see the prospect of a president with a religious background as proof of religion steadily creeping into politics and public life.

Opposition parliamentarians did not take their
 seats in protest against the vote  [Reuters]
Al Jazeera's correspondent Barnaby Phillips in Istanbul said that Gul was likely to triumph in the third round of voting on May 9, when an absolute majority of 276 will be enough to elect Gul.
 
Pro-secular Turks are set to a hold more protests and Philips says "the mood on the streets has been a little bit tense".
 
The government's supporters respond with charges of crisis-mongering and flouting democracy in a country where surveys show people increasingly identify with Islam.
 
'Political paralysis'
 
The CHP has also called for a general election to resolve the issue. Two smaller opposition parties also want early polls, but were against petitioning the court.
 
In a final appeal shortly before the vote started, Recep Tayyip Erdogan, the prime minister, called for reconciliation to avoid "political paralysis".

Many Turks fear a steady erosion of the secular
republic founder Kemal Ataturk's legacy [EPA]
Urging the opposition to vote, he said: "Let us not fall into the trap of those who are trying to drag Turkey back to the customs of the past, to those periods of political paralysis."
 
"Despite our differences, the result of our democratic rivalry, we are ... the representatives of the same nation."
 
The AKP, the moderate offshoot of a now-banned relgious movement, holds a solid majority of 352 in the 550-member assembly that will secure Gul's election, but only in the third or fourth round of voting.
 
The only other candidate, Ersonmez Yarbay, a dissident AKP deputy, withdrew shortly before voting began.
 
Last bastion
 
The CHP insists that the presidential palace, which it calls "the last bastion of secularism", cannot be left to someone with an Islamist background and whose wife wears a headscarf.
 
The AKP has disowned its religious roots, pledged commitment to the secular system and secured the opening of membership talks with the European Union.
 
But some of its actions, such as attempts to criminalise adultery, isolate alcohol-serving establishments in special zones and encourage Quranic courses, have fuelled suspicions of its religious ambitions.