U.K. lawmakers could send Prime Minister Theresa May back to the negotiating table, engineer a second referendum or prompt a general election when the final Brexit deal comes to Parliament for approval, according to an influential think tank.

The government has said that Parliament will have a take-it-or-leave-it vote on the deal it negotiates with Brussels, which it aims to complete in October—about five months before the U.K. is due to leave the European Union. Brexit Secretary David Davis says lawmakers can either vote for the deal, or for the much feared chaos of no deal.

But the Institute for Government argues that Parliament will almost certainly be able to amend the motion that May puts to the House of Commons to get approval. That will be lawmakers’ best chance to change the course of Brexit.

“This approval process could produce some of the most elevated moments of political theater in living memory,” the institute said in a paper published on Monday.

May doesn’t have a majority in Parliament and her Conservative Party is deeply divided over Brexit. She has been defeated on the issue there before, when Tory rebels voted with Labour lawmakers against the government. A group of anti-Brexit lawmakers is working to thwart Brexit, or at least bring about a second referendum, and their focus is on the tactics they will use this Fall when the deal is brought to the legislature for approval.

“It is in the government’s political self-interest to talk up the disruption associated with voting down the deal. However, the government’s claim that the vote is a binary choice between deal or no deal is wrong,” the institute said.

The House of Commons could amend the motion in the following ways:

  • Seeking a renegotiation
  • Telling the government to keep U.K. in EU
  • Telling the government to leave without a deal
  • Seeking a referendum on the deal

It could also vote against the motion. That might send officials back to the negotiating table, according to the IFG. Alternatively, a rejection could lead to Parliament trying to decide what happens next, such as an extension of the exit deadline. “It is possible that in the course of the parliamentary debate, it would become clear what Parliament intended by its rejection,” the IFG said.

If, however, various factions vote against it for different reasons, “the situation would be extremely murky. The government could attempt to chart a way forward but it is difficult to see how it could avoid a general election and in all likelihood a request to extend the Article 50 period,” the IFG argues.

The Fixed-term Parliaments Act—a law from 2011 that sets parliamentary terms at five years—leaves May without a tool her predecessors have used to force party discipline: Threatening to call an election if a vote is lost.

Even so, “there are ways for the prime minister to raise the stakes,” the IFG said. She could promise to table a motion calling for a general election if she loses, or vow to resign, it said.