Hungary’s parliament on Monday approved constitutional amendments that would pave the way for the removal of President Tamas Sulyok and impose term limits on lawmakers and Constitutional Court judges.

Prime Minister Péter Magyar accused Sulyok of supporting the policies of former prime minister Viktor Orbán, who was voted out of office in April. The amendments were approved by 139 lawmakers, securing the required two-thirds majority, while six abstained. Orbán’s Fidesz party boycotted the vote.

The changes require Sulyok’s signature to take effect. Magyar said he would initiate impeachment proceedings if the president refused to sign them. Such proceedings would require a two-thirds majority in parliament and approval by the Constitutional Court.

If the presidency becomes vacant, parliamentary speaker Agnes Forsthoffer would serve as acting head of state until a successor is elected. Hungary’s president is elected by parliament for a five-year term.

The amendments also stipulate that Constitutional Court judges must retire at the age of 70, affecting four of the court’s 15 judges, including Chief Justice Peter Polt, who is widely seen as an Orbán ally.

Lawmakers’ terms in office will also be capped at 12 years from the next parliamentary election in 2030. The measure would prevent Orbán from returning to parliament. He had served continuously as a lawmaker since 1990 but did not take up the parliamentary seat won by Fidesz in April.

In June, Magyar’s Tisza party used its two-thirds majority to pass a constitutional amendment limiting prime ministers to eight years in office, barring Orbán from returning as premier after serving from 1998 to 2002 and from 2010 until his election defeat. The change also means Magyar can serve no more than two terms.

Magyar has also pledged to draft a new constitution to replace the one introduced under Orbán, accusing the former prime minister of tailoring it entirely to serve his party’s political interests.