Nine months after a popular uprising that ended decades of authoritarian rule, Tunisians have voted for new leaders who will write the rules of the country's new political system.
More than 11,000 candidates are running in the election, representing 80 political parties. Several thousand candidates are running as independents.
Polling stations officially closed at 7pm (18:00 GMT), but election officials allowed people still queuing by the cut off point to stay and cast their historic ballots.
Long lines of people had formed at polling stations before dawn, growing into winding queues of voters keen to take part in the country's first electoral contest without a pre-determined result.
Turn out neared 70 per cent some two hours before closing time, elections chief Kamel Jendoubi said, adding that while early results could start coming through on Monday, official results were due Tuesday.
"The turnout of Tunisians exceeded all expectations," he said.
About 4.4 million registered voters are chosing a 217-member constituent assembly.
That multiparty body will, in addition to drafting a new constitution, also be charged with appointing an interim president and a caretaker government for the duration of the drafting process.
'Leading the way'
Al Jazeera's correspondents on the ground reported that despite high temperatures in and around the capital, hundreds came out and waited for hours in queues in order to cast their votes.
Al Jazeera's Nazanine Moshiri reports from Tunis
The government says that 40,000 police and soldiers have been deployed to prevent any possible protests escalating into violence.
Shopkeepers in Tunis, the capital, said that people had been stockpiling milk and bottled water in case any unrest disrupted the supply of necessities.
Jendoubi had declared his independent ISIE polling commission "ready and confident" ahead of voting, while a European Union observer mission said there was "almost no chance of cheating or falsifying results".
The EU has hailed Tunisia's elections and vowed support for the new authorities.
David Cameron, the British prime minister, said: "As the first country in the region to put democracy to the test at the polling booth, Tunisia is once again leading the way."
'Victory for dignity'
The mother of Mohamed Bouazizi, the young vegetable seller whose self-immolation last December set of the Tunisian revolt, said that the elections were a victory for dignity and freedom.
"Now I am happy that my son's death has given the chance to get beyond fear and injustice," Manoubia Bouazizi told the Reuters news agency.
"I'm an optimist, I wish success for my country."
The election is the first for many Tunisians where they have had a range of parties to choose from.
"I am 39 years old and this is the first time I'm voting, so it's about time," Mehdi Barabdullah, a voter at a polling station in Tunis, told Al Jazeera.
|In depth coverage of first Arab Spring vote
"I'm very, very happy for Tunisia. It's a historical time for us. This piece of paper that I can show you [marking my registration to vote] is a very important paper for us.
"I am voting for the future of my daughter and I'm absolutely thrilled by it."
Waleed, a 35-year-old voter, said: "I feel like my heart is going to explode now, today and for the last few days."
Ahmed Néjib Chebbi, the founder of the PDP, a centre-left political party, came to vote in Tahrir Mhiri, La Marsa.
"This is a celebration of democracy," he told Al Jazeera. "People are here to exercise their duties as citizens, and they are showing that they deserve the rights which they have been deprived of for decades."
"There is a massive participation in the vote today," he said, adding that votes tallied from overseas (on October 20 to 22) should not be taken as indicative of the final results.
Concerning the heckling of al-Nahda leader Rachid Ghannouchi and his family after they cast their votes at El Menzah 6 this morning, Nejib Chebbi said it was “regrettable” that the leader of al-Nahda had been treated in this way.
"No matter what his political ideas might be, Mr. Ghannouchi is a Tunisian citizen who deserves respect. Today is not a day for protest," he said.
Tunisia was the country that triggered what became known as the 'Arab Spring' after a month-long uprising forced then-President Zine El Abidine Ben Ali to flee to Saudi Arabia.
The protests quickly spread to neighbouring Egypt and Libya, along with countries in the Middle East such as Syria, Yemen and Bahrain.
The country has been relatively calm in the weeks leading up to the election, with the exception of isolated protests against Nessma TV.
Many countries across the region are paying close attention to Tunisia's democratic transition.
Sunday's election for the constituent assembly is a litmus test for the depth of change the country has seen since January; and nerves were high on the eve of the vote.
Tunisian authorities arrested at least two well-known activists on Saturday evening, both of whom have been prominent critics of the interim government led by Beji Caid Essebsi.