Britain and the European Union have reached a new agreement on post-Brexit trading arrangements for Northern Ireland, raising hopes that more than six years of wrangling over the U.K.'s departure from the bloc may finally come to an end.

The deal, announced Monday by British Prime Minister Rishi Sunak, is designed to replace existing rules that have been criticized for effectively creating a customs border between Northern Ireland and the rest of the United Kingdom, weakening the region's links to Britain.

WHAT WAS THE DEAL ABOUT?

The government says the new arrangements, known as the Windsor Framework, will eliminate the need for customs checks on most goods shipped to Northern Ireland from other parts of the U.K., cutting costs and reducing red tape. The deal also reduces the role of EU law and the European Court of Justice in Northern Ireland, a key demand of Brexit supporters who want to shake off the remnants of the bloc's influence.

WHY ARE WE STILL TALKING ABOUT THIS?

Northern Ireland has a unique position in the Brexit negotiations because it is the only part of the United Kingdom that shares a land border with the European Union. That border, which separates Northern Ireland from the Republic of Ireland to the south and east, is also particularly sensitive because of the history of sectarian violence on the island of Ireland.

The 1998 Good Friday agreement that largely ended three decades of violence was underpinned by the fact that both Northern Ireland and the Republic were members of the EU. That made it possible to remove border checkpoints that had been a source of tension and allow trade to flow freely, spurring economic development and creating jobs on both sides of the frontier.

When Britain left the bloc, negotiators for both sides pledged to keep the border open, even as the rules on everything from food and agriculture to steel and medicines began to diverge. That forced them to come up with a new way to protect their internal markets from products that didn't comply with their laws.

WHY DIDN'T BREXIT SETTLE THESE ISSUES?

Former Prime Minister Boris Johnson tried to resolve these questions with the so-called Northern Ireland Protocol, which required customs checks on some goods shipped from other parts of the U.K. as they entered Northern Ireland.

But Unionist politicians in Northern Ireland, who want to maintain the region's historic links to Great Britain, demanded that the protocol be scrapped because they said it treated the region differently from other parts of the country and weakened its status as an integral part of the United Kingdom.

Unionists and staunch Brexiteers also opposed the protocol because it meant that many EU rules still governed trade in Northern Ireland and because the European Court of Justice was empowered to settle disputes about these rules. That, they said, meant the people of Northern Ireland were subject to laws they had no role in making, creating a "democratic deficit."

The Democratic Unionist Party, the largest unionist party, resigned from Northern Ireland's power-sharing government early last year to put pressure on officials in London to renegotiate the protocol. Northern Ireland hasn't had an effective government since then.

HOW HAVE THESE ISSUES BEEN RESOLVED?

Sunak's deal scraps most checks on goods shipped to Northern Ireland from other parts of the U.K.

Products destined for use in Northern Ireland will now travel through a "green lane" without any checks other than those normally required for internal shipments. While those destined for the Republic of Ireland will still go through a "red lane," both sides have agreed to track those goods using technology and by sharing data from commercial declarations, reducing the need for border inspections.

Border checks will now focus on "risk-based and intelligence-led operations targeting criminality and smuggling," the U.K. government says.

Searching for an understandable example, Sunak repeatedly mentioned that sausages would no longer have checks and could move more swiftly across the Irish Sea -- a move certain to be met with satisfaction in Belfast. The absence of the humble banger on Northern Irish grocery store shelves had become a symbol of post-Brexit turmoil.

As a result of the deal, some 1,700 pages of EU law will no longer apply in Northern Ireland. But about 3% of EU laws will still be applicable in the region, meaning there is a possibility that the European Court of Justice could still be involved in a small number of disputes.

The deal also seeks to protect the democratic rights of Northern Ireland by giving the regional assembly the power to object to any new EU rules that may apply in its territory. If this "Stormont Brake" is triggered by 30% of the members of the regional assembly from two or more parties, the rule in question would be suspended unless both the U.K. and EU agreed to override those objections.

HAVE ALL THE ISSUES BEEN RESOLVED?

The biggest question remaining is whether the DUP will support the deal.

While Sunak received broad support from the House of Commons on Monday, DUP leader Jeffrey Donaldson has said his party will take time to "study the detail" of the agreement before deciding on its position.

"There's only one boulder left in the road, and that is the Democratic Unionist Party in Northern Ireland," said Jonathan Tonge, a professor of politics at the University of Liverpool. "They could turn a victory into defeat if they say no to this deal."

WILL NORTHERN IRELAND NOW GET A GOVERNMENT?

Not immediately.

Sunak stressed that this agreement is only about the trading arrangements for Northern Ireland, though he hopes it will lay the groundwork for the DUP and other parties to return to government.

The 1998 Good Friday Agreement seeks to promote peace in Northern Ireland by requiring unionist and nationalist politicians to share power in the regional government.

"I will respect the fact that the local parties need time and space to study the details," Sunak wrote Tuesday in the Belfast Newsletter.