Recep Tayyip Erdogan's supporters are celebrating after Turkey's long-time president won Sunday's vote, securing another five years in power.
"The entire nation of 85 million won," he told cheering crowds outside his enormous palace on the edge of Ankara.
But his call for unity sounded hollow as he ridiculed his opponent Kemal Kilicdaroglu - and took aim at a jailed Kurdish leader and the LGBT community.
The opposition leader denounced "the most unfair election in recent years".
Mr Kilicdaroglu said the president's political party had mobilised all the means of the state against him and he did not explicitly admit defeat.
President Erdogan ended with just over 52% of the vote, based on near-complete unofficial results. Almost half the electorate in this deeply polarised country did not back his authoritarian vision of Turkey.
Ultimately, Mr Kilicdaroglu was no match for the well-drilled Erdogan campaign, even if he took the president to a run-off second round for the first time since the post was made directly elected in 2014.
But he barely dented his rival's first-round lead, falling more than two million votes behind.
The president made the most of his victory, with an initial speech to supporters atop a bus in Turkey's biggest city, Istanbul, followed after dark by a balcony address from his palace to an adoring crowd that he numbered at 320,000 people.
"It is not just us who won, Turkey won," he declared, calling it one of the most important elections in Turkish history.
He taunted his opponent's defeat with the words "Bye, bye, Kemal" - a chant that was also taken up by his supporters in Ankara.
Mr Erdogan poured scorn on the main opposition party's increase in its number of MPs in the parliamentary vote two weeks earlier. The true number had fallen to 129, he said, because the party had handed over dozens of seats to its allies.
He also condemned the opposition alliance's pro-LGBT policies, which he said were in contrast with his own focus on families.
The run-up to the vote had become increasingly rancorous and in one incident late on Sunday, an opposition Good party official was fatally stabbed in front of a party office in the northern coastal town of Ordu.
The motive for Erhan Kurt's killing was not clear, but a leading opposition official blamed youths celebrating the election result.
Although the final results were not confirmed, the Supreme Election Council said there was no doubt who had won.