In Ankara, supporters of the ruling AKP party savoured their political victory into the night.  They sang, waved party flags, banged drums, hooted their car horns and thanked God.  Victory for this Islamist-leaning party was all the sweeter because few of them believed they would harvest enough votes to return to single party rule.  The ruling party didn't reach the 330 seats that would allow it to hold a referendum on increasing powers of the presidency - but such a move will very much remain on the political agenda.  But even amidst the celebrations there was recognition that the result had left Turkey polarised; there were promises that the AKP (the Justice and Development Party) would govern on behalf of all.  Much of the opposition, however, is suspicious and resentful.  The pro-Kurdish group the HDP saw its vote reduced.  It suffered because of the resumption of violence in the Kurdish areas which it believes the government stoked up to create a climate of instability.  President Erdogan, supposedly above the political fray, had campaigned with the slogan "it's me or chaos".  The leader of the HDP, Selahattin Demirtas, said: "This wasn't a fair election. We could not campaign because we had to protect our people from a massacre."  The HDP had suspended campaigning after the bombing in Ankara.  There was also a warning from the leader of the secularist party the CHP.  Its leader, Kemal Kilicdardoglu, said: "The party in power has to respect the principle of the supremacy of the law."  And the secularists will be suspicious that a confident ruling party could weaken basic freedoms.  Certainly it was an election where the opposition struggled to gain access to the mainstream media, but the opposition also have to learn from their own divisions.  Towering over this campaign was President Erdogan and he wasn't even on the ballot.  But the election was essentially about him. His grip on power has been strengthened and he is likely to manoeuvre to increase the role of the presidency.  His instincts are authoritarian and he resents criticism and opposition.  He has presided over an era where opponents are silenced and the critical media suppressed.  He is a politician who seems to need enemies. He presents himself as a rock, a bulwark against instability and many voters seemed to believe that.  seats in parliament for Justice and Development Party (AKP)  134 for Republican People's Party (CHP)  59 for People's Democratic Party (HDP)  41 for Nationalist Movement Party (MHP)  What is unclear is whether he will allow divisions to deepen or whether, having secured a victory for the party he founded, whether he will work to unite the country.  As regards the outside world, the West needs him and he knows it.  Turkey is a pivotal country both in regards to the war in Syria and the refugee crisis in Europe.  European leaders, in private, are highly critical of President Erdogan and his record on protecting human rights and the rule of law.  But they need his help to manage a refugee crisis that they are struggling to control.  Before the election they delayed publication of a critical report.  However uneasy they may feel about an emboldened President Erdogan they are likely, privately, to welcome a return to one-party government.  1970s-1980s - Active in Islamist circles, member of Necmettin Erbakan's Welfare Party  1994-1998 - Mayor of Istanbul, until military officers made power grab  1998 - Welfare Party banned, Erdogan jailed for four months for inciting religious hatred  Aug 2001 - Founds Islamist-rooted AKP with ally Abdullah Gul  2002-2003 - AKP wins solid majority in parliamentary election, Erdogan appointed prime minister  Aug 2014 - Becomes president after first-ever direct elections for head of state  Recep Tayyip Erdogan - Turkey's bruised battler  Their calculation will be that a strong government will be more likely to deliver a deal which slows the exodus of refugees from Turkey.  In return, President Erdogan will insist on easing travel restrictions in Europe and speeding up the country's application to join the EU.  In the end, interests will trump values and Europe will make compromises.  After this election result President Erdogan's ambitions to make Turkey a pivotal regional power will be strengthened.  It is worth recalling that just a short while ago Turkey was held up as a model democracy amidst the turmoil and uprisings of the Middle East.
The election result in Turkey strengthens the president's hand, but leaves the opposition resentful and suspicious, says Gavin Hewitt.