A bank manager explains the situation to pensioners waiting outside a branch of the National Bank of Greece hoping to get their pensions, in Thessaloniki, Greece June 29, 2015. REUTERS/Alexandros Avramidis

By Michele Kambas and Lefteris Papadimas

ATHENS (Reuters) - Tens of thousands of Greeks rallied on Monday to back their leftwing government's rejection of a tough international bailout after a clash with foreign lenders pushed Greece close to financial chaos and forced a shutdown of its banking system.

With a popular referendum on the bailout planned for Sunday, Prime Minister Alexis Tsipras put his own position on the line, saying he would respect the result of the vote but would not lead a government to administer "austerity in perpetuity."

"If the Greek people want to have a humiliated prime minister, there are a lot of them out there. It won't be me," he said in an interview on Greek state television as one of the biggest rallies seen in Athens in years was taking place.

The show of defiance came at the end of a day that started with stunned Greeks waking up to face shuttered banks, long supermarket lines and overwhelming uncertainty over Greece's future in the euro zone.

European leaders and policy makers, wrong-footed by Tsipras' shock announcement of the referendum in the early hours of Saturday morning, warned that it would be a plebiscite on Greece's future as a member of the single currency.

With Greece hours away from defaulting on a 1.6 billion euro loan from the International Monetary Fund, the crisis has escalated quickly.

Ratings agency Standard and Poor's cut Greece's sovereign debt rating one notch further into junk levels to CCC-, saying there was a 50 percent probability it would leave the euro zone.

Greeks - used to seeing lengthy talks with creditors end with an 11th-hour deal - were shocked by the turn of events. Queues snaked outside ATMs and inside supermarkets while fears of disruptions to fuel and medicine supplies grew.

Drugmakers said they would continue to ship medicines to Greece in coming weeks despite unpaid bills, but warned that supplies could soon be in jeopardy without emergency action.

The breakdown of talks has pushed the European Union and euro zone into uncharted terrain. The Athens stock exchange was closed like the banks, but other financial markets fell on fears that Greece could be heading out of the euro.

The blue-chip Euro STOXX 50 <.STOXX50E> index fell more than 4 percent, with bank shares down sharply [.EU] <.SX7E>. By midday, all three major U.S. stock indexes were down more than 1 percent. [.N]

"I can't believe it," said Athens resident Evgenia Gekou, 50, on her way to work. "I keep thinking we'll wake up tomorrow and everything will be OK. I'm trying hard not to worry."

After months of talks, Greece's exasperated European partners have put the blame for the crisis squarely on Tsipras for rejecting a package they consider generous. The Greek side argues that pension cuts and tax hikes demanded of it would only deepen one of the worst economic crises of modern times in a country where a quarter of the workforce is already unemployed.

A snap Reuters poll of more than 70 economists and traders taken on Monday put the probability of Greece leaving the euro zone at 45 percent, up from 30 percent a week ago.

PERSONAL BETRAYAL

Emotions were unusually raw among Europe's leaders. EU Commission President Jean-Claude Juncker said he felt personally betrayed and told Greeks a "No" vote would be seen as signalling an exit from the euro - a position that other European leaders lined up to echo.

"I will say to the Greeks, who I love deeply: you mustn't commit suicide because you are afraid of death," Juncker told a news conference.

Despite the acrimony over the weekend, the creditors said the door to negotiations remained open.

French President Francois Hollande appealed to Tsipras to return to the negotiating table and German Chancellor Angela Merkel said she was ready to restart talks with Athens after the referendum, including on how to ease its debt burden.

Hollande spoke to U.S. President Barack Obama, and Hollande's aide said they had agreed to work together for a resumption of talks and a solution to the crisis to ensure Greece's financial stability.

Greece's banks were shut after the European Central Bank rejected its request for 6 billion euros of additional emergency funding on Sunday to cope with massive withdrawals, though the ECB is expected to allow Greek banks to keep using existing funds until the referendum, people with knowledge of the matter told Reuters.

Story continues