Gul's nearest challenger, Sabahattin Cakmakoglu from the Nationalist Action Party, received 71 votes.

Barnaby Phillips, Al Jazeera's correspondent in Ankara, said the result was not a setback for Gul.

"The important thing, from his point of view, is that most of the opposition parties were here... they gave him a quorum. That means today's vote was legitimate and now the third round can go ahead," he said.

"The third round is when he sees salvation, the voting rules change, he only needs a straight majority of parliamentarians to back him... so essentially he is assured of the Turkish presidency."

Opposition

Gul has faced opposition to his bid for the presidency. When he first attempted to secure the position through a parliamentary vote in April millions of people took to the streets in protest.

"Next week he will get the sufficient number of votes and will be sworn in with lightning speed on the same evening"

Mehmet Ali Birand, columnist
Secularist Turks and the main opposition Republican People's Party (CHP) remain hostile to Gul's bid, arguing that his presidency would undermine the country's secular system.

The AKP, whose roots lie in political Islam, describes itself as a conservative, pro-Western party.

"His election as president is as good as guaranteed. Next week he will get the sufficient number of votes and will be sworn in with lightning speed on the same evening," Mehmet Ali Birand, a leading Turkish columnist, said.

Deadlock in parliament during his first attempt to secure the presidency led Gul to abandon his bid, but Recep Tayyip Erdogan, the prime minister, re-nominated him as a candidate, after his party's success in July's early parliamentary elections.

Gul's wife has been criticised by some secularists for wearing a headscarf, which Mustafa Kemal Ataturk, secular Turkey's founder, banned from daily life.

The ban has been enforced in public offices and schools since a military coup in 1980.

Secularism

The country of 74 million people is predominantly Muslim but is governed by a secular constitution.

The military, which traditionally sees itself as the guardian of secularism, has ousted four governments since 1960.

Gul has pledged loyalty to Turkey's constitution and promised neutrality, while Erdogan has said that Gul's membership in the party they founded in 2001 would end the minute he is elected president.

He says people should judge him for his record in office, where he helped win talks on joining the European Union and improved Turkey's human rights record.

The presidency is a largely ceremonial post but its incumbent does have the power to veto laws and official appointments, as well as name judges.