Hungary's parliament on Monday approved a constitutional amendment that prevents former Prime Minister Viktor Orbán from returning to office, cementing a major political shift months after the longtime nationalist leader was voted out of power.

The proposal from new Prime Minister Péter Magyar's camp and was backed by 135 lawmakers, with 50 voting against and 6 abstaining, according to the parliament's website.

The amendment says no one may hold the top government post if they have already held it for a total of at least eight years.

Orbán has spent about 20 years as prime minister across two terms, governing from 1998 to 2002 and again from 2010 to 2026.

The new rule also applies to Magyar. It limits him to a maximum of two full legislative terms in office, meaning he could be re-elected once if no early elections are held.