|Socrates had previously said he would no longer be able to run the country if planned spending cuts were rejected [EPA]
Jose Socrates, Portugal's prime minister, has resigned after all five opposition parties voted against his minority government's latest proposal for spending cuts and tax hikes.
"Today every opposition party rejected the measures proposed by the government to prevent that Portugal resort to external aid," Socrates said in a televised address on Wednesday.
"The opposition removed from the government the conditions to govern. As a result I have presented my resignation to the president," he said after meeting with President Anibal Cavaco Silva for about 20 minutes.
Socrates had previously said he would no longer be able to run the country if the plan was defeated.
The ruling Socialist Party can count on the support of only 97 members in the 230-seat parliament.
The main opposition centre-right Social Democratic Party (PSD) had allowed past austerity plans to pass by abstaining from voting.
But on Wednesday it joined smaller parties on the left and right in voting for resolutions denouncing the latest cost-cutting plan, which include further tax hikes and cuts to social spending.
The PSD argues that the measures hurt the weakest members of society hardest but the government has warned that failure to reach agreement on more austerity would push Portugal closer to needing a bailout.
"This crisis will have very serious consequences in terms of the confidence Portugal needs to enjoy with institutions and financial markets," Socrates said.
"So from now on it is those who provoked it who will be responsible for its consequences."
The setback could thwart efforts by European leaders to persuade nervous investors that all is well in the eurozone and force Portugal in to accepting financial assistance in common with Greece and Ireland.
Al Jazeera's Barnaby Phillips, reporting from Lisbon, said Portugal now enters a period of "extreme uncertainty just when this country needs it the least".
"What we can assume is that there will be some kind of caretaker administration." he said.
"The Portuguese constitution allows for elections within 55 days. Now that feels a little bit of a long way away given the economic crisis this country is in.
"There has been talk in parliament of amending that, bringing some kind of emergency legislation forward that would enable elections to take place earlier."