Turkey's ruling Justice and Development Party (AKP) has won a third term in parliament, winning nearly 50 per cent of the vote in the country's general election.
But the AKP, led by Recep Tayyip Erdogan, the country's prime minister, fell short of its target of 330 seats on Sunday, which would have allowed it to press ahead with its plans to unilaterally rewrite the country's constitution.
In a victory speech before thousands of flag-waving supporters in the capital Ankara, Erdogan pledged "humility" and said he would work with rivals.
"People gave us a message to build the new constitution through consensus and negotiation," he said.
"We will discuss the new constitution with opposition parties. This new constitution will meet peace and justice demands."
Erdogan said a new constitution, replacing one introduced under martial law in 1982, was needed to make Turkey more democratic and to enhance individual freedoms.
Celebrating crowds, waving Turkish and AKP flags, gathered outside the party's headquarters in Ankara, where Erdogan addressed supporters.
Crowds also gathered in Istanbul's main Taksim Square to watch the speech on big screens, Al Jazeera's Ayse Alibeyoglu reported from the scene.
Turkey's booming economy during the AKP's decade-long stewardship, as well as the country's heightened international profile, had been seen as Erdogan's main strengths going into Sunday's vote.
Opponents say the AKP wants to write the constitution to consolidate its grip on power, and say Erdogan wants to introduce a system with more executive powers for the president - a role they accuse him of coveting.
|Turkish parliament seat breakdown
Erdogan's socially conservative party won 49.9 per cent of the vote, with the main opposition Republican People's Party (CHP) getting 25.9 per cent, and the Nationalist Movement Party (MHP) 13 per cent.
Independent candidates, representing the pro-Kurdish Peace and Democracy Party (BDP) in the Kurdish-majority southeast, polled 5.9 per cent of votes.
Under Turkey's electoral system, a party must gain at least 10 per cent of the national vote to win seats in the National Assembly.
Final results indicate that the AKP will have 326 seats in the new parliament, the CHP 135, the MHP 53, and independents 36.
'End of long marathon'
Kemal Kilicdaroglu, the leader of the CHP, who voted in Ankara, said: "We have come to the end of a long marathon ... There is a good mood. There is a democracy feast".
The CHP, a secularist centre-left party, had built its election campaign on pledges of democratic reform, arguing that the AKP was turning Turkey into a "police state".
Sex tapes forced 10 leading members of the MHP to quit the election race, prompting speculation over whether the party could slip under the 10 per cent threshold.
Voters cast their ballots in transparent plastic boxes, rather than traditional wooden boxes, for the first time - a measure introduced to prevent allegations of fraud.
Istanbul will be represented by 85 deputies in the new parliament, while Ankara gets 31 seats. Many of Turkey's less populated provinces will be represented by a single deputy.
Seats are awarded on the basis of proportional representation, with each party gaining a number of seats in each district based on its share of the local vote.