Spain's prime minister has replaced unpopular Education Minister Jose Ignacio Wert in an apparent step to try to halt the government's slide in popularity ratings ahead of this year's general election.

Wert's education reform bill met with wide opposition from regional officials and teacher and parent groups and he regularly scored lowly in opinion poll ratings.

Prime Minister Mariano Rajoy promised Cabinet and party changes after the party lost control in many regional and city governments after local elections May 24. He made some party changes last week.

Polls indicate Rajoy's group could lose its Parliament majority in general elections to be held by end of the year.

The government said Wert's replacement, current State Secretary for the European Union Inigo Mendez de Vigo, would take up the post Friday.