LONDON — The British government on Wednesday delayed calling a fresh election in Northern Ireland, hoping to buy time to break an impasse over post-Brexit trade rules that put the administration there on ice.

Northern Ireland Secretary Chris Heaton-Harris said he was giving lawmakers in Belfast another few weeks to try to form a power-sharing government and avert an election that almost no one wants. He also said he would slash the legislators’ salaries until they get the Northern Ireland administration back up and running.

“The vast majority of those I have spoken to think that an election at this time would be most unwelcome,” Heaton-Harris said.” However, he is required to call one under the complex political rules that govern Northern Ireland’s peace process.

The Northern Ireland Assembly’s attempts to form a government following a May election collapsed last month due to a dispute rooted in Brexit that has upset the delicate balance between Protestant unionists who consider themselves British and largely Roman Catholic nationalists who see themselves as Irish.

Under election rules, a new vote should be held within 12 weeks, by Jan. 19. Heaton-Harris said he would reset the clock by giving lawmakers until Dec. 8 to form a government, with the option of a further six-week extension after that.

He said the move would “hopefully create the time and space … for the UK and the European Union to develop their talks and for the parties to work together in the hope that we can restore the devolved institutions as soon as possible.”

Northern Ireland is the only part of the UK that shares a border with an EU member — Ireland. When Britain left the bloc in 2020, the two sides agreed to keep the Irish border free of customs posts and other checks because an open border is a key pillar of the peace process that ended 30 years of violence in Northern Ireland.

Instead, there are checks on some goods entering Northern Ireland from the rest of the UK Unionist politicians say the new checks undermine Northern Ireland’s place in the United Kingdom, and refused to join a power-sharing government until they were scrapped.

No government can be formed without the agreement of both the largest unionist group, the Democratic Unionist Party, and the biggest nationalist party, Sinn Fein.

The impasse has left Northern Ireland’s 1.8 million people without a functioning decentralized government at a time when many are struggling with soaring food and energy prices.

The UK’s Conservative government is pinning its hopes on striking a deal with the EU that would ease the checks and coax the DUP back into government.

Months of talks when former Prime Minister Boris Johnson was in office proved fruitless, but the mood has improved since Prime Minister Rishi Sunak took over last month.

Irish Foreign Minister Simon Coveney said the delay in calling an election “provides further space for early substantive progress in discussions between the EU and UK on the issues of most concern to people and business” in Northern Ireland.