The failure of the Portuguese parliament to pass a budget for 2022 threw the future of Socialist Prime Minister Antonio Costa's government into doubt on Wednesday.
The spending proposal failed by 117 votes to 108, with five abstentions, according to the Publico newspaper.
President Marcelo Rebelo de Sousa said he will call a new election if the budget is not quickly passed.
Currently, the next election is not due until 2023.
Costa leads a minority government, with his moderate Socialists having 108 of 230 seats in parliament.
He depends upon the support of smaller left-wing parties that are not part of the government to get legislation passed.
But the Marxist Left Bloc and the Communist Party voted against the budget, as did the conservative Social Democratic Party.
The left-wing parties wanted greater spending on anti-poverty measures and on the healthcare system, as well as improvements to labour laws.
Even though Costa'a allies deserted him, he still could have got the budget passed with the support of all 108 of his party members plus eight abstentions.
In response to criticism from the left, Costa's Socialists stressed that they reached the limit of what was financially feasible. The party said it did not want a snap election, but it did not fear one either.
Yet there is concern the right-wing populist party Chega! (Enough!) could make significant gains in the event of a new election.
In the last parliamentary election in 2019, it had to settle for 1.3% of the vote and one seat. In the presidential election last January, its candidate Andre Ventura won 11.9% of the vote.