Turkey's ruling Justice and Development Party (AKP) chose Binali Yildirim, the transport minister and a loyalist of President Recep Tayyip Erdogan, as its new chief at a special congress held Sunday in Ankara.
Yildirim, 60, a staunch conservative and the sole candidate, replaces Ahmet Davutoglu at the helm. Davutoglu formally submitted his resignation to Erdogan as prime minister, local media reported.
The president is expected to meet Yildirim, after sending him a formal congratulations message on the win, giving him the nod to set up a new cabinet.
Davutoglu, who gave a farewell address at the event saying he had not wanted the congress but was in favour of party unity, had served in the role since 2014, taking the AKP to an election victory last year.
Erdogan supporters in the party had recently accused Davutoglu of having divergent views from the president and moved to push him out. Erdogan is widely believed to have had a hand in picking the new party leader.
The Islamic-rooted AKP, which has formed every government since 2002, has insisted there are no "gaps" between the new leader and the president. The party's top brass insists Erdogan remains their leader.
Under Turkey's constitution, the president is meant to be non-partisan; Erdogan resigned as party chief in 2014 when he was elected head of state.
Erdogan wants to change the country's constitution to empower the presidency, but critics warn this would weaken parliament, cautioning that the judiciary already appears to have been affected by purges and politicization.
The president has been taking steps to consolidate his grip on power, amid recent crackdowns on opposition media.
Last week, the AKP-dominated parliament voted to remove the immunity of 138 lawmakers, in a move that was seen as targeting the pro-Kurdish members.
European politicians, including the office of German Chancellor Angela Merkel, have expressed concern. Merkel is due to raise the matter when she meets Erdogan in Turkey on Monday, on the sidelines of a humanitarian summit.
Yildirim had been nominated for the post of prime minister at a special executive committee meeting of the AKP last week.
He takes hold of the reins during a turbulent time for Turkey, with security forces at war with the Kurdistan Workers' Party (PKK) in the mostly Kurdish south-east, while Islamic State remains a threat and still controls territory just over the border in Syria.
Despite recent political instability, the country's economy has shown some resilience amid pressure on the currency and concerns over inflation.
Given Turkey's current foreign relation tensions, the state-run Anadolu news agency said all ambassadors in the country were invited to the AKP congress except those of Egypt, Israel, Bangladesh, Syria and Russia.