When British Prime Minister Theresa May called a Parliamentary election in hopes of securing an absolute majority for the Conservative Party, she didn’t realize the move was a major gamble. And instead of winning big, her party lost 13 seats—and majority control of Parliament.

So May turned to the Democratic Unionist Party (the DUP)—a little-known conservative party from Northern Ireland—to form a coalition that would give her a working majority in Parliament. But the seemingly simple deal may come with a heap of trouble: It’s angered other political groups, may undermine Brexit negotiations, and could upend almost two decades of peace in the turbulent region of Northern Ireland.

Confused yet? Here’s a guide to the most puzzling questions about the DUP, Northern Ireland and Brexit.

What’s the deal with May’s deal?

On June 26, Theresa May and Arlene Foster, leader of the DUP, agreed to a supply and confidence agreement that will help May’s conservative party get the votes it needs to control decision-making in Parliament. The price of this deal? Forking over £1.5 billion (almost $2 billion) to Northern Ireland over the next two years, only £500 million of which had previously been earmarked for the region. The money will go towards infrastructure, health and education. In return, the DUP will support the Tories (the Conservative Party) on platforms like homeland security legislation and Brexit negotiations by providing the necessary votes.

What is Northern Ireland?

Politically, Northern Ireland is a part of the United Kingdom (if you need to brush up on what that means, read this). Geographically, it’s part of the island of Ireland, but not part of Great Britain—and that’s exactly as complicated as it seems.

It all started nearly a millennium ago, when an English king invaded Ireland. Power shifted back and forth a number of times over the centuries, and relations got more fraught after Henry VIII introduced Protestantism to the Catholic country in 1534. All the while, English colonists were coming to the island of Ireland and establishing themselves there, especially in the northeast around the industrial hub of Ulster. This region would eventually become the political entity known as Northern Ireland.

Centuries of fighting culminated in the 1921 Government of Ireland Act, which split the country into six majority-Protestant counties in the north and 26 majority-Catholic counties to the south. Thus Northern Ireland was born, and the rest of Ireland was left to rule itself as the Republic of Ireland.

Who’s in charge of Northern Ireland?

Northern Ireland is technically part of the United Kingdom, but it’s not ruled by English Parliament. Rather, two opposing political groups share power in the Northern Ireland Executive, also known as a devolved government. Those power-sharing groups are the leftist Sinn Fein (also known as nationalists, those who want to join the nation of Ireland) and the conservative DUP (or unionists, who want Northern Ireland to remain part of the United Kingdom).

The power-sharing scheme was created during the Good Friday Agreement of 1998, which ended a 30-year period of violence between the two groups that resulted in nearly 4,000 dead and 50,000 casualties. But this January, the power-sharing coalition collapsed, and even after Sinn Fein won a historically large number of seats in the Northern Ireland Assembly in March—just one fewer than the DUP—no agreement was reached between the parties that would allow them to move forward.

Talks to reform the semi-autonomous government are still ongoing. But with the new coalition between the DUP and the Tories, those talks might be even more strained than before. According to The Telegraph, Sinn Fein president Gerry Adams said, “The DUP are showing no urgency or no real inclination to deal with the rights-based issues which are at the crux and heart of these difficulties”—including marriage equality, an Irish language act and the country’s legacy of violence.

What is the DUP?

The Democratic Unionist Party was created by radical Protestant leader Ian Paisley in 1971. The group was on the unionist side of the Troubles—they wanted Northern Ireland to stay part of the “union” with the U.K., in part because many members track their ancestry back to mainland Britain. The culturally conservative party has vetoed same-sex marriage legislation, opposes making abortion legal, and its members deny climate change and have supported the teaching of creationism. It’s also connected to the far-right Orange Order, “whose members are forbidden from marrying a Catholic, from participating in Roman Catholic Churches,” says Jonathon Tonge, a professor of political science at the University of Liverpool and author of Northern Ireland.

Though the DUP is ideologically conservative, the party is left of center when it comes to economic issues. “On economics it’s more populist, it wants the government in Westminster to spend more money in Northern Ireland,” Tonge says. That’s evident in the deal they negotiated with May, which resulted in much more funding for Northern Ireland social services.

Isn’t that opposition party, Sinn Fein, in support of terrorists?

Early in its history, Sinn Fein supported the Irish Republican Army, which has alternately been termed a group of terrorists or freedom fighters. Either way, the IRA was behind multiple deadly attacks in Northern Ireland and on mainland Britain. But since the Good Friday Agreement, Sinn Fein has denounced violence in the name of Irish nationalism, and has operated as the left-wing opposition to the DUP.

Shouldn’t everyone be happy that DUP is negotiating for more money for Northern Ireland?

Yes and no. “So long as the DUP stays just with the cash rather than the sash—that being the sash of the Orange Order—it needn’t alienate nationalists,” Tonge says. In other words, if the DUP just accepts the money for Northern Ireland, it shouldn’t cause any controversy with Sinn Fein. But the DUP may use their position to later demand Northern Ireland end investigations into the British state for crimes committed during the Troubles, or that they end the Parades Commission that dictates where the Orange Order can march. (In the past, Orangemen marches through predominantly Catholic neighborhoods have resulted in riots and violence, which is why the commission was created.) Both these agenda items run counter to Sinn Fein’s platform.

The other problem is that the Good Friday Agreement of 1998 hinges on the British government being a neutral, third-party peace broker. “The Tory-DUP pact undermines the neutrality as it is an agreement between the governing party and a staunchly unionist party. This could have far reaching ramifications,”—including difficulty reforming the devolved government, said Henry Jarrett, University of Exeter professor of international relations, by email.

The sentiment has been echoed elsewhere. “The peace process, which was very hard earned over very many years … people shouldn’t regard it as a given,” former conservative Prime Minister John Major told the BBC. “It isn’t certain, it is under stress. It is fragile.”

What does all this mean for Brexit?

The DUP-Tory coalition definitely makes Brexit negotiations more complicated. First and foremost, the Republic of Ireland is part of the European Union, and that won’t change regardless of what its neighbor does.

Since the Good Friday Agreement was reached, the border between Northern Ireland and Ireland has been more of a political fact than a physical one. There are no fences, no towers, no tariffs on goods passing between the two regions. But all that could change under Brexit.

“If Northern Ireland is outside the EU, which it would be, then there’s going to have to be tariffs on goods,” Tonge says. “The DUP doesn’t want special status in the U.K., it thinks that will be a slippery slope toward a unified Ireland. They want to leave the E.U., but they don’t want any of the consequences that come from leaving the E.U..” In other words, the DUP wants to support the rest of the United Kingdom in Brexit, but it doesn’t want to face any of the consequences of doing so, because that would mean barriers between Northern Ireland and the Republic of Ireland, which might reignite the violent fight over unification.

The president of Sinn Fein, Gerry Adams, has gone so far as to say that taking Northern Ireland out of the E.U. will destroy the Good Friday Agreement. But Tonge is slightly more optimistic, in that everyone is taking the issue into serious consideration.

“All sides recognize the sensitivity of the border and don’t want to go back to the days when it was like a fortress,” Tonge says. No one wants a war that lasted 30 years to pick up again—but how Brexit will be negotiated without triggering one is still up for debate.