French President Emmanuel Macron and German Chancellor Olaf Scholz suffered massive defeats in the European Parliament elections Sunday, as far-right parties made gains that could sway the bloc to take a harder line on migration and upset ambitious actions to protect the environment.

Despite the defeats on the national level, center-left and center-right parties across Europe are set to preserve their majority in the European Union-wide ballot, which determines the make-up of the bloc’s legislative assembly.

European Commission President Ursula von der Leyen’s European People’s Party was projected to finish first, getting 181 seats.