LONDON (AP) — British Prime Minister Boris Johnson is heading to Northern Ireland on Monday to try to end a political deadlock that is preventing the formation of a regional administration.

The trip comes amid threats by Johnson’s government to break the Brexit agreement with the European Union that it signed, but now blames for the crisis.

Johnson said there would be “a necessity to act” if the EU didn’t agree to overhaul post-Brexit trade rules.

Voters in Northern Ireland elected a new Assembly this month, in an election that saw Irish nationalist party Sinn Fein win the most seats. It was the first time a party that seeks union with the Republic of Ireland has won an election in the bastion of Protestant unionist power.

The Democratic Unionist Party came second and is refusing to form a government, or even allow the assembly to sit, until Johnson’s government scraps post-Brexit checks on goods entering Northern Ireland from the rest of the U.K.

Under power-sharing rules set up as part of Northern Ireland’s peace process, a government can’t be formed without the cooperation of both nationalist and unionist parties.

Johnson will urge political leaders in Belfast to get back to work and deal with “bread and butter” issues such as the soaring cost of living, his office said Sunday.

But Johnson also accused accuse the EU of refusing to give ground over post-Brexit border checks.

Northern Ireland is the only part of the U.K. that shares a border with the EU. When Britain left the bloc in 2020, a deal was agreed to keep the Irish land border free of customs posts and other checks, because an open border is a key pillar of the peace process that ended decades of violence in Northern Ireland. Instead, there are checks on some goods, such as meat and eggs, entering Northern Ireland from the rest of the U.K.

The arrangement is opposed by unionists in Northern Ireland, who say the new checks have put a burden on businesses and frayed the bonds between Northern Ireland and the rest of the U.K.

The British government agrees that the regulations are destabilizing Northern Ireland’s peace agreement, which relies on support from both Protestant unionist and Catholic nationalist communities.

The prime minister’s office said Sunday that the trade agreement — which Johnson’s government negotiated and signed — had “resulted in the unionist community feeling like its aspirations and identity are threatened.”

In the Belfast Telegraph, Johnson accused the EU of failing to recognize that the arrangements weren’t working.

“I hope the EU’s position changes. If it does not, there will be a necessity to act,” he wrote.

Johnson said his government would “set out a more detailed assessment and next steps to Parliament in the coming days.”

The U.K. has said it may pass a law allowing it to override parts of the Brexit treaty if the EU doesn’t agree to scrap the checks. If that happened the EU would hit back with legal action — and potentially trade sanctions. The 27-nation bloc is Britain’s biggest economic partner.

Ivan Rogers, a former British ambassador to the EU, said “I think there’s a severe risk that we are heading into a trade war.”

Irish Foreign Minister Simon Coveney said Britain’s “saber-rattling and grandstanding” was undermining Northern Ireland peace “at a time when the world needs the Western world to be united, to be acting in concert to solve problems together.”

“The last thing the EU wants, the last thing that Ireland wants, is tension with the U.K., particularly at the moment given what’s happening in Ukraine, Russian aggression, and the need to work together on an international stage,” he told Sky News.