Hungary’s parliament approved a constitutional amendment limiting prime ministers to a maximum of eight years in office, a move that effectively bars former prime minister Viktor Orban from holding the post again.

The amendment was passed after Prime Minister Peter Magyar won April’s election, ending Orban’s 16-year tenure and securing a two-thirds parliamentary majority. The majority allows Magyar’s party to amend or reverse legislation introduced by Orban’s Fidesz party, including changes to the constitution.

Under the amendment, anyone who has previously served as prime minister for at least eight years “cannot be elected prime minister.” The provision applies to prime ministerial terms held after May 2, 1990.

The new rules also require prime ministers to leave office after serving a total of eight years, equivalent to two terms.

The constitutional amendment further paves the way for the dissolution of the Sovereignty Protection Office, which was established under Orban’s government and stigmatised opposition figures and journalists for serving “foreign interests.”

In addition, the amendment returns the founders’ rights of so-called public-interest asset-management foundations to the state. Orban’s government had transferred state assets worth hundreds of billions of forints to these foundations.