President Trump is reportedly mulling an executive order to withdraw the United States from the North American Free Trade Agreement, a major trade deal with Canada and Mexico that reshaped broad sections of the U.S. economy after going into effect in 1994. But it might not be as easy to get out of NAFTA as Trump may think.

The president’s aversion toward multilateral trade agreements placed him in a similar ideological camp as pro-Brexit voters in Britain, who narrowly won a referendum last year to withdraw their country from the European Union. Trump celebrated the result at the time and claimed he successfully predicted it, even referring to himself as “Mr. Brexit.” For him and his supporters, the surprise result across the Atlantic showed their upset victory could also be possible. It additionally demonstrated a broader populist backlash against establishment institutions.

Britain’s experience also illustrates how Trump might not be able to carry out his own Amerexit from the free-trade agreement he’s so frequently criticized. To understand the difference, look no further than Article 50 of the Treaty on European Union, which establishes the legal mechanism by which a country can withdraw from the European bloc.

1. Any Member State may decide to withdraw from the Union in accordance with its own constitutional requirements.

2. A Member State which decides to withdraw shall notify the European Council of its intention. In the light of the guidelines provided by the European Council, the Union shall negotiate and conclude an agreement with that State, setting out the arrangements for its withdrawal, taking account of the framework for its future relationship with the Union. That agreement shall be negotiated in accordance with Article 218(3) of the Treaty on the Functioning of the European Union. It shall be concluded on behalf of the Union by the Council, acting by a qualified majority, after obtaining the consent of the European Parliament.

3. The Treaties shall cease to apply to the State in question from the date of entry into force of the withdrawal agreement or, failing that, two years after the notification referred to in paragraph 2, unless the European Council, in agreement with the Member State concerned, unanimously decides to extend this period.

Setting aside the legalese, Article 50 is essentially a ticking time bomb with a two-year fuse. First, a country formally notifies the European Council of its intent to withdraw. This may seem largely procedural since no country would decide to leave without a referendum or parliamentary vote of some kind. But the intent to withdraw isn’t really about informing European leaders; it’s about starting the two-year countdown. Once time is up, the country is out.

We’re seeing this play out in real time with Brexit. The moment Prime Minister Theresa May sent European Council President Donald Tusk a letter informing him of the U.K.’s formal intent to withdraw on March 29, it opened a 24-month window for Britain and Europe to negotiate the country’s orderly withdrawal. Ideally, both sides would reach an agreement before that window closes. But Britain will be severed from the European Union in two years whether they reach one or not. (The two sides can extend the deadline, but it’s not clear if all 27 European countries would agree to one unless a final deal were imminent.)

The equivalent text in the North American Free Trade Agreement, on the other hand, is less dramatic.

Article 2205: Withdrawal

A Party may withdraw from this Agreement six months after it provides written notice of withdrawal to the other Parties. If a Party withdraws, the Agreement shall remain in force for the remaining Parties.

Under Article 50, the EU treaties “shall cease to apply” once the two-year transition period ends. Under Article 2205, however, a participating country “may withdraw” from the agreement once the six-month period ends. That’s no small difference: The first phrasing sets forth that a country must withdraw, while the second one indicates that a country can withdraw.

Jon Johnson, an adviser to the Canadian government during the original NAFTA negotiations, described this crucial phrasing earlier this year as a potential barrier for Trump’s unilateral action. “Under the plain wording of NAFTA Article 2205, providing the written notice is simply a condition that a party has to fulfill before it proceeds to withdraw from NAFTA,” he wrote. “Providing the notice does not have the effect of causing a party to withdraw from NAFTA.”

What’s more, Trump might not have the lawful authority to yank the United States out of the agreement—it’s a matter of debate. Many experts believe that, under Section 125 of the Trade Act of 1974, the president possesses the authority to unilaterally withdraw from trade agreements, including NAFTA. But it’s somewhat uncharted legal territory, and not all agree. Since Congress enacted NAFTA’s provisions by passing a federal law called the Implementation Act, Johnson argues, which doesn’t grant the president the power to withdraw from NAFTA unilaterally, he can’t act on his own. “Since NAFTA was approved by Congress under the authority expressly granted to Congress under the Commerce Clause, it follows that only Congress has the power to reverse that approval and cause the United States to withdraw from NAFTA,” he concludes.

That could forestall Trump from attempting a Brexit of his own. In Britain, the decision to leave the EU was ultimately up to Theresa May. But in North America, a different “may” could still keep the United States in NAFTA.