MADRID—Spanish lawmakers voted to oust Prime Minister Mariano Rajoy on Friday, ushering in a center-left government whose new leader pledged to enact a moderate, pro-European agenda unlikely to knock Spain’s robust economic recovery off course.
Spain’s parliament voted 180 to 169, with one abstention, to remove Mr. Rajoy, cutting short the second term of one of Europe’s longest-serving leaders currently in power. The center-left Socialist Party had called the no-confidence vote last week and proposed its leader to replace...