Binali Yildirim arrived at the Justice and Development Party congress in Ankara, Turkey, on Sunday. Mr. Yildirim, a longtime ally of President Recep Tayyip Erdogan, was unanimously elected prime minister.CreditCreditBurhan Ozbilici/Associated Press

ISTANBUL — Turkey’s governing Justice and Development Party unanimously elected a longtime ally of President Recep Tayyip Erdogan to become its new leader and prime minister on Sunday, paving the way for a constitutional overhaul that would allow the president to extend his powers.

Binali Yildirim, the sole candidate for prime minister, received votes from all 1,405 delegates at a party congress. Later on Sunday, Mr. Erdogan gave Mr. Yildirim the official mandate to form a government.

The previous prime minister, Ahmet Davutoglu, abruptly stepped down May 5 after a public rift with Mr. Erdogan.

Mr. Yildirim, 60, is expected to play a subservient role to the president, and to push forward a series of constitutional amendments that would allow Mr. Erdogan to establish an all-powerful presidential system. As the Constitution now stands, Mr. Erdogan has some genuine powers, but the post of president is largely ceremonial.

“We have always proudly said that we are Recep Tayyip Erdogan’s companion, that we share a common fate and common passion,” Mr. Yildirim said in an address to his party on Sunday. “Mr. President, we promise that your passion will be our passion, your cause will be our cause, your path will be our path.”

By law, Mr. Erdogan is supposed to be above party politics, so he did not attend the convention. Even so, he made himself felt there, with a message that was read at the opening of the ceremony. In the message, he called for a new Constitution and a new system of government. Members of the party stood up as his message was read.

“My legal bond with the A.K.P. may have ended the day I took the presidential oath of office, but my bonds of love have never ended and never will,” he said in the statement, using the Turkish abbreviation for the Justice and Development Party.

An anthem was played several times in his honor, and banners celebrated him as the country’s pre-eminent leader. “The man of the people, our leader, Erdogan,” one poster read. A giant portrait of Mr. Erdogan hung from the center of the auditorium, with banners of Mr. Yildirim and Mr. Davutoglu on either side.

Party leaders announced that the new government would work in harmony with the president to realize central goals for Turkey’s future.

“Turkey’s ruling A.K. Party only has one leader, and that is President Erdogan,” said Justice Minister Bekir Bozdag, the chairman of the party convention.

Sentiments expressed at the party congress have been echoed by pro-government columnists, who have called for “obedience” to the “chief” since Mr. Davutoglu’s resignation.

“Let everybody be comfortable and keep his eye on the chief,” wrote Markar Asayan, a columnist for the pro-government newspaper Aksam. “Are we not a huge orchestra looking in the eyes of its conductor? Can this work be done any other way?”

A version of this article appears in print on , Section A, Page 3 of the New York edition with the headline: Party in Turkey Elects Erdogan Ally as Prime Minister. Order Reprints | Today’s Paper | Subscribe