Earlier today, the Spanish parliament (specifically, the first chamber, known as the Congress) voted to replace Mariano Rajoy (Popular Party) as prime minister with Pedro Sánchez (Socialist). This is the first case of a “constructive” vote of no confidence under Spain’s constitution.
The constructive vote requires an opposition motion proposing removal of the prime minister and cabinet to state who the new prime minister would be. If the motion receives a majority in favor, the proposed replacement takes office, without need of a further investiture vote. Germany and a few other countries have similar provisions.
The vote was 180-169 in the 350-seat chamber. The farther-left Podemos and several regional parties voted in favor, while the Ciudadanos voted with the Rajoy government.
It is remarkable in that the Socialists won just 24% of the seats in the most recent (2016) election. Thus the new government will be a rather extreme minority government. (I am assuming no coalition partners will be brought into the cabinet.)
This is the system working exactly as intended. In fact, I would call this an example of parliamentary government at its best. The now-ousted government was itself a minority government, and it received only a plurality of members (170) voting in favor of its investiture when it was formed (thanks to 68 deputies abstaining). The replacement has now received, as required by the constitution, a majority. This combination of provisions makes it relatively easy* to form a minority government when the bargaining situation in parliament is difficult, as it was following the 2016 election. Yet such a government, once formed, will be quite stable because it is more difficult to vote it out than if no-confidence votes required only a negative vote against the incumbent (with its replacement to be subject to subsequent bargaining).
The new government surely will not have an easy time passing policy. It is not required to pass a new budget, nor does failure to pass a budget necessarily require a government to resign in Spain–another stability-enhancing mechanism. It seems likely that an election will come earlier than the end of a full term (2020), however. In the meantime, it is probably stable in the sense of not likely to be removed by parliament, given that such a vote would require a new majority to prefer someone else as leader.
* “Easy” here does not mean it might not take quite some time, just that it is not required to get parties comprising a majority to give the government an affirmative mandate. In fact, Rajoy’s minority government was approved just over four months after the June, 2016, election.