Last month, Michel Barnier found himself among a herd of cows. There he was, meandering in lush green fields, but not in his native France.

The European Union’s top diplomat leading the Brexit talks to negotiate Britain’s exit from the E.U. was straddling the invisible border between the Republic of Ireland and Northern Ireland.

As the cows looked on at the well-dressed diplomats trudging through the fields, Barnier said he wanted to understand the challenge Europe faces in making sure that the historic 1998 Good Friday Agreement that ended the decades-long conflict in Northern Ireland would not fall asunder.

“Many in Ireland fear the return of tensions in the North,” Barnier had earlier told a joint session of the houses of Parliament in Dublin. “Only 15 years ago did checkpoints and controls totally disappear. Thanks to the Good Friday Agreement that ended decades of violence.” Then he added, “Brexit changes the external borders of the E.U. I will work with you to avoid a hard border.”

Whether other European leaders realize it or not, the future stability of Ireland and the peace process rests with Brussels, not London. When it comes to the Brexit negotiations, Brussels is in the driver’s seat. In practice, this is the E.U.’s great chance to be flexible and creative in pushing for a soft border between Northern Ireland and Ireland instead of cementing divisions on the island.

“Brexit is such a big strategic issue for the E.U.” said Ben Tonra, professor of international relations at University College Dublin. “It is about the stability of Europe’s most western neighborhood.”

British Prime Minister Theresa May isn’t helping matters. To prop up her minority Conservative government, she has turned to the staunchly conservative Democratic Unionist Party (DUP), Northern Ireland’s biggest political party. The timing couldn’t be worse.

On Monday, May won over the DUP by promising Northern Ireland an extra $1.3 billion over the next two years, sweetened by raising pensions by 2.5 percent each year. This at a time when the government has been reducing its support to the devolved regions of Scotland and Wales.

The government in Northern Ireland collapsed in January over a heating bill scandal. Since then, the DUP which supports the union with Britain, and its coalition partners, the nationalist Sinn Fein party, which supports the unification of Ireland, have been bickering over how to revive the executive.

If they don’t reach an agreement by June 29, the British government will impose direct rule over the province. That would be an enormous blow to the peace process, which gave the province the right to govern itself.

“A deal between the DUP and [Britain’s] Conservatives could complicate the situation in Northern Ireland,” Andrew Gilmore, Brexit expert at the Dublin-based Institute of International and European Affairs, said to me. “With the DUP so close to the heart of power in Westminster, a return to direct rule from London could be problematic,” he added. Direct rule would rob Northern Ireland of having a real say in the Brexit negotiations. Not only that, the Good Friday Agreement specifically states that the British government must exercise “rigorous impartiality” in its dealing with all the communities in Northern Ireland.

“Northern Ireland needs its own voice, in the context of Brexit in particular as well as so many other issues that need to be resolved,” Irish foreign minister Simon Coveney said. “Without that voice people in Northern Ireland will be disadvantaged in a major way and will be essentially relying on others to make the case for them,” he told politicians in Northern Ireland.

He had no illusions about what was at stake. “I think it’s fair to say that Northern Ireland is perhaps the most vulnerable part of Europe to a bad Brexit deal should that happen.”

With days left to revive home rule in Northern Ireland, the good news is that with some exceptions, both the DUP and Sinn Fein oppose a hard border consisting of controls and checks between Northern Ireland and Ireland. “This is despite the fact that the majority of DUP voters opted for Brexit, said Federico Fabbrini, director of the Brexit research and policy at Dublin City University, in an interview.

Once Britain leaves the E.U., Ireland becomes an external border to the E.U. That should mean the imposition of border controls between Northern Ireland, which will leave the E.U., and Ireland, which will remain. That’s how it is between E.U. member Poland and non E.U.-member Belarus. Barnier knows that it would require consensus from all 27 member states to grant an exemption to reestablishing border crossings on the island of Ireland.

Then there are the E.U.’s four freedoms — freedom of movement, of labor, of capital and of services that have helped to underpin the Good Friday Agreement. “With Brexit, how do you monitor plumbers crossing the border?” Tonra said. “These are huge issues.”

Barnier seems undaunted. “European integration helped to remove borders that once existed on maps and in minds,” he told the Irish parliamentarians before setting off to the gorgeous invisible border of Lough Egish, with its surrounding meadows and contented cows.

This article was originally published by the Washington Post.