Greece is staring into the abyss.

Talks in Europe over how to save the country from defaulting on its debt collapsed Saturday.

Anxious Greeks queued at ATMs to withdraw cash, worried that banks may not open after the weekend and that Greece may have to abandon the euro. Billions have already been taken out in recent months as the crisis deepened.

European finance ministers refused a request from Greece to keep talking for yet another month after the government in Athens walked out of negotiations late Friday, pouring scorn on the latest offer of more bailout money for more economic reforms.

"Regrettably, despite efforts at all levels and full support of the Eurogroup, this proposal has been rejected by the Greek authorities," the finance ministers said in a statement.

Greece faces a hard deadline on Tuesday to pay about 1.5 billion euros to the International Monetary Fund, one of its main bailout lenders. If Greece doesn't pay, it will become the first developed country to default on the IMF.

It may also become the first country to leave the eurozone.

Related: 11 faces of Greece's euro dilemma

Unable to borrow from financial markets, and unwilling to strike a deal with Europe, Greece will struggle to pay its bills -- let alone service its debts -- without printing its own currency.

After weeks of talks, Prime Minister Alexis Tsipras said Friday he could not accept the terms being offered by Europe and the IMF. He said he would recommend that Greeks vote against them in a referendum on July 5. (The Greek Parliament on Saturday formally voted to hold the referendum.)

That brought an abrupt end to a series of discussions aimed at finding a way for the creditors to release the remaining 7.2 billion euros of Greece's huge bailout, in return for budget savings and economic reforms.

The rest of the eurozone set to work on Plan B instead -- how to limit the damage of a Greek default.

"Euro area member states intend to make full use of all the instruments available to preserve the integrity and stability of the euro area. This will complement any actions the European Central Bank may take," 18 eurozone finance ministers said in a statement. Greek officials were not present at that meeting.

The euro is much better placed now than a few years ago to withstand such a shock.

Greece's debt is mainly in the hands of other governments, rather than foreign banks or investors.

The European Central Bank has launched a program of massive monetary stimulus, and the risk of contagion is reduced because countries such as Spain, Portugal and Ireland are all growing again.

Europe has also adopted new rules to help countries that get into difficulty.

Related: 6 reasons Grexit wouldn't be a total disaster

But the damage to Greece will be much more severe.

The prospect of a default may force the ECB to curtail the emergency funding that has been keeping Greek banks afloat this year.

That's because it would have to apply a big discount to the value of Greek government debt the country's banks use as collateral for ECB funds.

The ECB said it was monitoring the situation closely and would hold a meeting "in due course."

Its decision will determine whether Greek banks have enough cash to open Monday, and if they do, whether they'll have to impose capital controls -- restricting the amount people can withdraw.

Eurozone finance ministers said the expiration of the bailout on Tuesday would require the Greek authorities to take measures "to safeguard the stability of the Greek financial system."

Every ATM I drove by has lineups and they are growing. pic.twitter.com/D23N5a3moR — Sakis Michalarakos (@SakisMicha) June 26, 2015

Left-wing leader Tsipras was elected in January on a promise to end years of austerity. Europe and the IMF since agreed to ease budget surplus targets, but otherwise stuck largely to their guns, arguing more reforms were vital to put the economy on a sounder footing.

European governments were caught between trying to find a way to help Greece recover from five years of crisis, and concerns among their own voters about throwing good money after bad.

Tsipras said the demand by the bailout lenders for more labor market reform, cuts to pensions and public sector wages, and higher taxes on food, restaurants and tourism amounted to an attempt to humiliate the Greek people.

-- CNN's Elinda Labropoulou and Chris Liakos contributed to this report.