Portugal's centre-right government has been forced to resign after an alliance of leftist politicians rejected its policy proposals, paving the way for a socialist-led administration to end years of austerity.
The dramatic collapse of Prime Minister Pedro Passos Coelho's government on Tuesday came less than two weeks after it was sworn into office, and raised questions about the country's commitment to abide by the eurozone's tough fiscal rules.
In an unprecedented move, the moderate Socialist Party teamed up with the Communist Party and the Left Bloc to get a 122-seat majority in the 230-seat parliament, which it used to vote down the proposed government programme.
Socialist leader Antonio Costa is expected to become prime minister in the coming weeks, supported by the communists and Left Bloc.
Costa criticised the government for being "submissive" in its dealings with the rest of Europe and making more cutbacks than those demanded by the bailout creditors.
"The Portuguese want change," he said.
Outside the parliament, demonstrators at an anti-austerity protest by labour groups shouted "Victory!" as the news of the vote spread.
The leftist alliance intends to reverse cuts in pay, pensions and public services, as well as tax increases that have brought widespread hardship, street protests and strikes in recent years.
About 400,000 Portuguese have left the country to seek work abroad.
Related: Portugal government re-elected despite harsh austerity
Portugal's centre-right coalition government won the country's general election on October 4 but fell short of a crucial outright majority in parliament.
The three left-wing parties that did amass a parliamentary majority agreed after the election to put deep ideological differences behind them and group together to oust the centre-right coalition government.
They formalised their agreement to provide majority backing for a socialist-led government on Tuesday, just before the vote.
The government's fall is seen as a political setback for the 19-nation eurozone's austerity strategy.
The policy of cutbacks was demanded by Germany and others as a remedy for the bloc's recent financial crisis.
Ahead of the vote, Finance Minister Maria Luis Albuquerque warned parliament that investor confidence was already waning, while failure to cut the budget deficit in line with Lisbon's EU commitments could provoke a new debt crisis and need for another bailout.
But Mario Centeno, the Socialist Party's leading economic expert, sought to soothe eurozone and market fears about the next government's plans, saying it would "abide by its European responsibilities and honour all its commitments".
The three parties in the leftist alliance have in the past had hostile relations, however, and will be watched closely for any signs of friction.
The speaker of parliament was due to inform President Anibal Cavaco Silva of the vote later on Tuesday.
The head of state, who has no executive power but oversees the government, then consults the political parties in coming days before deciding whether to invite Costa to form a government.
Cavaco Silva could choose to appoint a caretaker government, but analysts believed that was unlikely.