The departing premier, Mr. Kenny, announced his retirement on May 17 after being weakened by a scandal over his government’s handling of police corruption. He gave up the party leadership immediately, but said he would stay on as caretaker prime minister until the next sitting of the Dail, as the lower house of Parliament is known, later this month.

Though the Fine Gael party and its allies have the largest bloc of seats in Parliament, they do not command a majority. Even so, opposition parties are not expected to block Mr. Varadkar’s formal election as prime minister by the Dail. To do so would prompt a general election, which none of the major parties want right now.

Mr. Varadkar clinched the Fine Gael leadership on Friday by defeating his only rival, Simon Coveney, a fellow cabinet minister, in an internal party election. Though Mr. Coveney received more votes from rank-and-file members, Mr. Varadkar had greater support among Fine Gael’s members of Parliament. Under the party’s weighted voting rules, that made Mr. Varadkar the winner.

A habit of speaking out on issues outside his ministerial responsibilities has sometimes embroiled Mr. Varadkar in controversy. In 2011, six months after Ireland was pressured into accepting a bailout of 85 billion euros by the European Union (about $122 billion), he claimed (incorrectly, as it turned out) that a second bailout might soon be necessary. His comment caused consternation among colleagues in the government who were trying to persuade the world that Ireland had finally stabilized itself after the banking and housing crash of 2008.

Mr. Varadkar was accused of racism in 2008 after he suggested in the Dail that unemployed immigrants should be paid to leave the country. He denied the accusation and said he was talking about a voluntary program, not forced deportation.

He is unlikely to enjoy a long political honeymoon. His party’s chief rival, Fianna Fail — also center-right — can bring down the government and force a general election whenever it feels the moment is advantageous. It does not seem advantageous now: The two parties are running close in most opinion polls, with, if anything, a narrow lead for Fine Gael.

Meanwhile, the government faces a number of serious domestic issues that could blow up into crises, including the troubled public health service; soaring rents and housing prices; anger at rising economic inequality; an interlocking nest of church-and-state questions; and slumping police morale and discipline.