The polls have closed after Tunisia's first presidential election since the 2011 "Arab Spring" that triggered uprisings across the region.
About 54% of the electorate took part, with no reports of any violence.
Interim president Moncef Marzouki and anti-Islamist leader Beji Caid Essebsi were touted as the favourites in a field of more than 25 candidates.
Both campaigns claimed to have won the most votes but admitted that a second round of voting next month was likely.
The official results are due out later this week and if no candidate wins more than 50%, a run-off will be held on 31 December.
The poll forms part of a political transition after the revolution that ousted Zine al-Abidine Ben Ali.
A parliamentary vote was held in October.
Tunisia - seen as the birthplace of the Arab Spring - is considered to have had the most successful outcome, with relatively low levels of violence.
Sunday's election will deliver the country's first directly elected leader since the removal of Mr Ben Ali. Most polling stations were open for 10 hours from 08:00 (07:00 GMT).
"We were the first to enter this cycle of change which they have called the Arab Spring," Prime Minister Mehdi Jomaa was quoted as saying on the eve of the poll.
"We will be the first [to make the transition] but others will follow," he added.
Mr Essebsi, who is from the Nidaa Tounes (Tunisia's Call) party, came out on top in the poll, according to one of his officials.
"Essebsi is ahead according to initial results, with a big difference to the next candidate," campaign manager Mohsen Marzouk told reporters, but he admitted there was "a strong possibility of a second round".
Mr Essebsi was the frontrunner after his party came first in the parliamentary election.
But critics say the 87-year-old, who served in the governments of post-independence leader Habib Bourguiba as well as Mr Ben Ali, represents the past.
"Tunisians will have their say and I will accept their choice to consolidate Tunisia's transition," Mr Essebsi told reporters after voting in Tunis.
Correspondents say his main opposition came from Mr Marzouki, the interim president and a human rights campaigner who has cast himself as a guardian of the spirit of the revolution.
Mr Marzouki's camp insisted the contest was neck and neck, with their candidate possibly ahead by a small margin.
"At the worst we are even but at best we're between 2 and 4% ahead," Mr Marzouki's campaign manager Adnene Mancer told reporters. "Our chances are good as we go into a runoff."
Among the other candidates were Parliamentary Speaker Mustapha Ben Jaafar, Republican Party leader Ahmed Nejib Chebbi, female magistrate Kalthoum Kannou and businessman Slim Riahi.
The Islamist party Ennahda, which led Tunisia's last government but was beaten by Nidaa Tounes in October's parliamentary election, did not field a candidate.
A statement from Ennahda leader Rachid Ghannouchi spoke of wanting "to avoid deepening polarisation or dividing the country". Ennahda's rise had led to concerns among more secular-minded Tunisians that Islamists would dominate politics.
Tunisia is still facing the spectre of civil unrest and terrorism, with Interior Minister Lotfi Ben Jeddou warning of "serious security threats" near the Algerian border where al-Qaeda militants are said to be hiding.