While President Donald Trump has vowed to formally withdraw from the Paris climate agreement, sparking international outrage, it doesn’t necessarily mean the end of U.S. involvement forever. A future president could have us back in the agreement in as little as 30 days, legal experts say.

Under the rules of the Paris agreement, parties are allowed to exit and re-enter as they choose, though withdrawing is a much lengthier legal process than returning. And there are no provisions stipulating how much time has passed after withdrawal before a nation can begin the process of rejoining the agreement.

“A subsequent president would thus be able to submit a document stating the United States’ intention to become a party to the Agreement as soon as she or he wanted to,” Michael Burger, executive director of the Sabin Center for Climate Change Law at Columbia Law School, said in an email to The Washington Post — though he added that such an action is certainly outside the norm.

“Countries don’t typically withdraw from complex international agreements that they led the way in negotiating,” he said.

The rules of withdrawal:

As it is, Trump’s verbal pledge to withdraw, which he revealed in an internationally resounding announcement last week, is not final — yet, anyway. Withdrawal requires a formal process, which will require nearly four years in total. The earliest a U.S. withdrawal could be finalized is Nov. 4, 2020.

According to the rules of the Paris agreement, nations wishing to exit must first submit a document to the United Nations specifying their intent to withdraw. However, this is only permitted after three years have passed since the agreement entered into force — and that date was Nov. 4, 2016. This means the U.S. can submit its written notice Nov. 4, 2019, at the earliest. After that, the rules specify that the official withdrawal will take effect exactly one year later at the earliest, or potentially on a later date of the party’s choosing.

In that intervening year, a nation may decide to cancel its withdrawal at any point, said Maria Manguiat, a climate expert with the United Nations Environment Programme’s Law Division. “It doesn’t make the country look very good, but legally it’s entitled to do that,” she told The Washington Post.

Altogether, if Trump acted as quickly as possible to withdraw from the agreement, the process could be completed Nov. 4, 2020 at the earliest. That’s the day after the next presidential election.

Rejoining the agreement:

And as Burger pointed out, there’s nothing stopping a future president from adding us right back in again.

According to the agreement’s rules, parties may officially join in one of two ways. First, they can join by signature and ratification — that is, by participating in the agreement’s original negotiations and then signing on board. This is how the U.S. originally became a part of the agreement.

After the deadline for signature has passed, which occurred April 21 of this year, parties may join through a process called accession, which is essentially the legal term for joining an agreement at a later date, after it has already been negotiated and signed by other nations. Parties that join by accession are subject to all the same conditions as parties that joined by signature, and nothing in the rules prevents a nation from joining by signature, withdrawing and then rejoining by accession.

According to Manguiat, the U.S. could do just that by simply submitting another document to the United Nations, which it may do at any time after withdrawal takes effect — even immediately, if the president so chose. Its re-entry would take legal effect just 30 days later.

In theory, our next president could start this process immediately upon taking office – potentially right after the Jan. 20, 2021, inauguration, if a transition occurs at that time. And in the meantime, it’s likely that rejoining Paris will feature as a key campaign promise for any liberal candidates running against Trump in 2020. International outrage aside, polls suggested that most Americans wanted the U.S. to remain in the Paris agreement, and it’s likely that many would support an immediate re-entry under a new leader.

Meanwhile, the U.S. can actually keep participating in Paris negotiations:

The country will legally remain a party to the agreement and have a seat at the table in future Paris-related negotiations until it officially exits. It’s unclear how involved the U.S. will be in these processes, now that the intent to withdraw has been announced.

According to Manguiat, there are important negotiations still coming up in the next few years that the U.S. has the potential to influence while it’s still a party to the agreement. Among these is the crafting of the Paris “rulebook,” a set of guidelines on how parties should communicate updates on their domestic climate action, review their collective progress and other issues related to the implementation and enforcement of the agreement. These guidelines are supposed to be completed in 2018, according to Manguiat, meaning the U.S. will still have the opportunity to be involved.

“Whether that means that the U.S. would still insist on certain positions or whether it will take a backseat knowing that it won’t be in the agreement in a few years, no one can tell,” she said.