The frontrunner for Turkey's presidency Abdullah Gul has failed to secure a two-thirds majority in a first round of voting in the Turkish parliament.
Abdullah Gul has declared loyalty to Turkey's secular constitution
Mr Gul, the foreign minister and a devout Muslim, is expected to win in a further round next week.
His candidacy has been fiercely resisted by secularists - including army generals and opposition leaders.
Mr Gul's presidential bid forced a general election which his AK Party won by a landslide last month.
He has vowed to remain loyal to the country's secular constitution if elected.
In Monday's ballot he won 341 votes from the 550-seat house, 26 short of the two-thirds majority needed to win outright.
The other two candidates, a right-wing nationalist and centre-left politician, received 70 and 13 votes respectively.
The largest opposition party, the CHP, boycotted the vote.
A second round is due on Friday.
In the third round of voting on 28 August a candidate only needs to secure a simple majority of votes - which the AKP has - but that could herald tense times ahead, reports the BBC's Sarah Rainsford in Istanbul.
The initial presidential vote in April also prompted a boycott by the opposition, in which Mr Gul was labelled a threat to the secular system.
Protesters took to the streets in protest at Mr Gul's candidacy and the military warned it was ready to step in.
But since then, the AK Party has been returned to parliament with 46% of the vote.
Mr Gul says that is proof that most Turks do not believe he has an Islamic agenda.
The military will be watching for his slightest slip, our correspondent says, and there is already furious debate because Mr Gul's wife wears the Islamic headscarf.
It is seen by some as a symbol of political Islam and is banned in all state institutions, including the presidential palace.