Greece's parliament voted early Sunday in favor of Prime Minister Alexis Tsipras' motion to hold a July 5 referendum on creditor proposals for reforms in exchange for loans, with the country's future in the eurozone looking increasingly shaky.

Tsipras' surprise call stunned Greece's international debt negotiators, and the country took a big step closer to falling out of the euro currency union after fellow eurozone member states refused to extend its bailout program past its expiry date on Tuesday, leaving Greece on the brink of financial chaos.

In the streets of Greece, worried people queued outside banks for cash from dawn to dusk after Tsipras' announcement in the early hours of Saturday, after billions of euros had already been emptied in the preceding weeks.

Greece has a 1.6 billion euro ($1.8 billion) debt due to the International Monetary Fund on Tuesday and its bailout program expires the same day, after which it is unclear how the country might survive financially.

The referendum is set for next Sunday with the question on whether to accept proposed reforms needed to get bailout loans from other eurozone countries and the IMF. The government is advocating a rejection of the proposals.

The radical left-wing leader accused the creditors of using blackmail and ultimatums against his proud but struggling people. European officials and all Greek opposition parties except the extremist far-right Golden Dawn party called his move for a vote a foolish and rash gambit that effectively ended negotiations to keep Greece financially afloat.

The sudden move comes after five months of stalemated negotiations, with Tsipras accusing creditors of trying to strong-arm his country into taking harsh austerity measures he says would hammer an economy already on its knees after five months of creditor-demanded spending cuts and tax hikes.

"They didn't ask us to agree, they asked us to surrender our political dignity," Tsipras said during a tumultuous and nearly 13-hour parliamentary session that cumulated in a vote just before 3 a.m. Sunday. Out of parliament's 300 lawmakers, 178 voted in favor and 120 against, with two people absent.

He insisted the Greek side had "exhausted every limit of concessions so there could be an agreement, adding that "perhaps some saw that as a weakness."

The referendum move further crumbled already strained relations between Greece and its European partners.

Tsipras said the Greek people would vote against a deal next Sunday.

"This no will also be a big yes, a big yes to the decision of the Greek government to reject an ultimatum that insults the Greek people."

Tsipras dismissed harsh criticism from other European countries on his decision.

"The referendum will take place as scheduled, next Sunday, whether our partners want it or not," he said.

Eurozone finance ministers earlier rejected Greek Finance Minister Yanis Varoufakis' request for a one-month extension to the bailout program, with Varoufakis then leaving the meeting.

"It's a sad day for Europe, but we will overcome it," he said.

The other 18 finance ministers then huddled without him to assess how to minimize the damage from the Greek crisis on their currency.

"Our institutions are and will be prepared to take any action if needed," said top eurozone official Jeroen Dijsselbloem of fears that financial turbulence might extend to the rest of the currency bloc. Fellow ministers spoke candidly about the risks of a Greek exit from the euro in a way that would have been inconceivable only weeks ago.

The ministers stressed Greece remained in the eurozone for now, and Dijsselbloem said "the eurogroup stands ready to reconvene to take appropriate decisions where needed, in the interest of Greece as euro area member."

Without a bailout program extension or more loans from creditors, Greece is likely to be in arrears on a debt payment due the same day. Its banks face the risk of collapse.

"The Greek authorities have asked for a month extension. But in that month there can be no disbursements," Dijsselbloem said. "How does the Greek government think that it will survive and deal with its problems in that period? I do not know."

France's finance minister, Michel Sapin, stressed a deal was still possible and that he was ready to act as a go-between among Greece and the creditors after relations neared a breaking point.

Dijsselbloem refused to slam the door full shut. "The door is open. It was not the institutions that walked away from the last talks last night."

Now much will depend on whether the European Central Bank will accept to continue to prop up Greek banks even after the country's bailout program expires. It would be under huge pressure to stop using eurozone taxpayer money to keep alive the banks if there is no prospect for a deal.

The eurozone finance ministers suggested Greece should take steps to stabilize its financial system -- code for putting limits on cash withdrawals and money transfers.

If Greece's banks collapse, the government would have to support them itself. Penniless, it would have to revert to printing a new currency, effectively drawing the country out of the euro union.

The ECB's governing council will meet "in due course" to assess the situation, most likely this Sunday, officials said.

While the government is recommending a "no" vote, Varoufakis noted "the high possibility that the Greek people will vote against the advice of the Greek government."

What would happen in that case -- whether Greece would have to leave the euro or try to renegotiate with creditors -- is unclear.

An exit from the euro would put Greece through a new era of economic pain. With the new currency less valuable than the euro, the government would have to write off a chunk of its foreign loans -- mainly owed to eurozone countries -- and many companies and households would go bankrupt. Experts predict a long and deep recession in a country that has already been through five years economic depression.

The uncertainties of all this would roil European and global markets, though experts are divided on the extent. Some say Europe is better equipped to handle a Greek euro exit, but others say it is unclear what might happen. The euro dropped in value slightly on international markets after the referendum was called.