A handout image made available by the CHP Press Office on June 25, 2018, shows Muharrem Ince, defeated presidential candidate of main opposition Republican People's Party (CHP), holding a news conference the day after the nation went to the polls. (Ziya Koseoglu/AFP/Getty Images)

The primary challenger to Turkish President Recep Tayyip Erdogan conceded defeat Monday, even as he warned of a “one-man regime” rooted in the greatly expanded powers Erdogan has gained by winning Turkey’s most consequential election in a generation.

The challenger, Muharrem Ince, said that the entire election process had been “unjust” but that he accepted the results of the vote.

For Erdogan, the victory is the climax of a years-long effort to consolidate sweeping powers, aided by purges and emergency rule and by winning a narrowly approved referendum last year that amended the constitution. On the international stage, the result could complicate uneasy relationships with the United States, NATO and the European Union.

“The victor of this election is the democracy, national will and the nation itself,” Erdogan told jubilant supporters Sunday, addressing them from a balcony as red flares lit up the crowd. “We will go with even more determination against terrorist organizations. We will take our country’s international reputation even higher.”

In state media, an unofficial tally gave Erdogan 52.6 percent of the ballots, with Ince trailing at 30.6 percent. Turkey’s election council also declared victory for Erdogan but did not release a breakdown, saying that full results would be released July 5. 

In Ankara, the capital, Ince urged Erdogan to “be the president” of Turkey’s 81 million people as he embarks on another five-year term, but the challenger warned against the dangers of one-man rule. The election completed Turkey’s transition to an executive presidency, which eliminates the post of prime minister and gives the president broad governing powers, curbing the authority of both parliament and the judiciary.

“This is a big threat,” said Ince, whose Republican People’s Party (CHP) forms the largest opposition bloc in parliament. Erdogan’s ruling Justice and Development Party (AKP) and its right-wing ally, the Nationalist Movement Party (MHP),  won a majority in the polls Sunday. 

“Collectively, we are going to pay the price,” Ince  said. “Turkey has cut off its connection to democratic values.”

The election marked a critical test for Erdogan, 64. For the first time since coming to power in 2002, he had faced a formidable challenger in the charismatic and outspoken Ince, whose election rallies drew millions nationwide.

Still, it was not enough to break the president’s grip on power. 

His supporters took to the streets in Istanbul and other cities in celebration Sunday night. On Monday, Turkish markets rallied, and the lira, which had tumbled in recent weeks, strengthened against the dollar.

European leaders on Monday urged Erdogan to improve his human rights record.

Turkey declared a state of emergency after a coup attempt in July 2016, and it has been extended seven times. German Foreign Minister Heiko Maas said Monday that Turkey should lift the state of emergency as soon as possible. In comments carried by state media, Bekir Bozdag, Turkey’s deputy prime minister, said the president would do so once conditions were deemed fit. 

“The will is clear,” he said. 

Erdogan has clashed repeatedly with Western allies — in part, analysts said, as a way of ­motivating his nationalist supporters and allies during election season. It was unclear whether the ­election result would further strain relationships already frayed by disagreements over issues that included Turkey’s human rights record and the war in Syria.

With more than 55 million Turks registered to vote, the state-run Anadolu news agency put turnout at 87 percent. But international observers said the playing field had been uneven and complained that two observers had been unable to enter the country. 

The pro-Kurdish Peoples’ Democratic Party (HDP) passed the 10 percent threshold to enter parliament, despite the imprisonment of its leader and presidential candidate, Selahattin Demirtas.

“The fact that I was forced to campaign in detention conditions was the greatest injustice,” Demirtas posted Monday on Twitter.

His party may have benefited from the perception that Erdogan’s government had become more hostile to Kurds over the past three years, as war reignited between Turkish forces and the militant Kurdistan Workers’ Party, and as the president struck an alliance with the nationalist MHP, which rejects peace talks with the militants. 

But predictions that voters who are tired of Erdogan would break for the other opposition parties — and deny him a majority in parliament — appeared not to materialize.

“Voters moved around within the pro-Erdogan and anti-Erdogan blocs,” said Soner Cagaptay, a Turkish American political scientist at the Washington Institute for Near East Policy. In central Turkey, he said, voters moved from the AKP to their allies, the MHP. 

“If the MHP hadn’t allied with Erdogan, he would have lost the presidential and parliamentary elections,” Cagaptay said. The alliance “was a masterstroke by Erdogan — probably his most important masterstroke of the last 16 years.” 

Erdogan’s consolidation of power has included a purge of perceived enemies from government institutions and the
jailing of opponents. The media has been brought to heel as independent news organizations have been shuttered and prominent journalists put on trial. 

During the campaign and in his post-election speeches, Erdogan at times acknowledged the complaints about the government’s heavy hand.

“We will never allow anybody in this country to feel despised, to feel that their rights are restricted or uncomfortable due to their roots, their beliefs, their clothing, their lifestyle or any other difference they may have,” he said on Sunday. 

He also referred to “vandals and gangs of betrayal who rubbed their hands expecting Turkey to kneel on its knees.”

Loveluck reported from Beirut. Kareem Fahim in Jiddah, Saudi Arabia, contributed to this report.