LONDON — The British and Irish prime ministers met political leaders in Belfast on yesterday in a bid to end a political stalemate that has left Northern Ireland without a government for more than a year.

British Prime Minister Theresa May and her Irish counterpart, Leo Varadkar, were holding talks with the main parties in Northern Ireland’s collapsed power-sharing administration.

May’s office said the trip was aimed at encouraging the pro-British Democratic Unionist Party and Irish nationalists of the Sinn Fein party to resolve their differences.

Northern Ireland’s Catholic-Protestant power-sharing government has been suspended since January 2017, when it broke down amid a scandal over a botched green-energy project. The rift soon widened to broader cultural and political issues, with Sinn Fein demands for Irish-language protections seen as the main sticking point.

The two parties have blamed each other for the impasse that threatens power-sharing, the key achievement of Northern Ireland’s 1998 peace accord that ended decades of bloodshed.

Several U.K.-government-set deadlines to restore the Northern Ireland administration have passed without success, raising the specter that the British government might impose direct rule from London on Northern Ireland.