Dueling rallies of tens of thousands of people apiece took over central Athens on Friday evening, with demonstrators making their final push before a referendum on Sunday that has passionately divided this flailing nation between those terrified Greece will lose its place in Europe and others determined to transform the continent at all costs.

With Greece’s 19th-century Olympic stadium as a backdrop, “yes” supporters shouted their contempt for the government and demanded an end to the brinkmanship that has characterized the country’s relationship with Europe for the past five months.

Across town, in the shadow of the neo­classical Parliament building, those siding with Greece’s leaders in urging a “no” vote on European bailout proposals swayed to the tunes of revolutionary anthems and pledged not to bend to creditors’ “blackmail.”

“Here in the place where democracy was born,” Prime Minister Alexis Tsipras told an energized crowd that stretched for blocks in every direction, “we will start to rebuild European democracy.”

But beneath the bravado was an emerging recognition within Greece’s radical leftist government that regardless of how Sunday’s referendum turns out, the country may be on the verge of defeat in its epic standoff with European heavyweights over the terms of the country’s bailouts.

Pensioners line up outside a National Bank branch to receive part of their pensions in Iraklio on the island of Crete, Greece, July 3, 2015. (Stringer/Reuters)

Given the perilous state of Greece’s banks, which lack the funds to continue dispensing even meager sums of cash past Monday, and faced with the tangible prospect of having to drop out of the euro zone, Greek officials say the country has few good options if European negotiators refuse to yield.

“If they decide to push things to the edge, the Greek side is not in a strong position anymore,” said Nasos Iliopoulos, a member of the 13-member committee that sets policy within the ruling Syriza party.

Even if Greece sides with the government and votes “no” on a proposal made last month by the country’s European creditors, ­Iliopoulos said in an interview, the government may be forced to quit rather than accept terms that violate its principles, an outcome that he said is in line with European officials’ intentions.

“I’m not sure that even 60 percent for ‘no’ will stop the coup d’etat we are facing,” he said.

Just a week after Tsipras called for the referendum, and with just a day to go before polls open, surveys show that Greece is almost exactly split on the question of how it will vote Sunday. Tsipras shocked the nation, and the world, by calling the vote, and from the beginning it has been dogged by criticism of its purpose and validity.

The question of whether the vote would happen at all was in doubt until Friday evening, when Greece’s top administrative court overruled a challenge to its constitutionality.

Supporters of Greece's bailout terms have taken a thin lead over the "No" vote backed by the leftist government, according to an opinion poll. This comes 48 hours before a referendum that may determine the country's future in the euro zone. (Reuters)

The referendum has been sharply criticized by European ­officials for the breakneck pace at which it was organized and the lack of clarity in a ballot question laced with technical jargon.

Valdis Dombrovskis, the commissioner for the euro, told Germany’s Die Welt newspaper that the question is “neither factually nor legally correct,” noting that it prompts voters to issue a verdict on a European proposal that has already been withdrawn.

Tsipras asked Greece on Friday to deliver a “no” vote to strengthen his hand in negotiations that have been put on ice amid the referendum campaign.

But Dombrovskis suggested a “no” vote would only add further complications to an already poisonous process. “It would be wrong to assume that a ‘no’ would strengthen the Greek negotiating position. The opposite is the case,” he said.

Greece and Europe have been locked in a showdown since January, when Greek voters elected the once-fringe Syriza in an overwhelming display of contempt for the severe austerity policies enforced as a condition of the country’s bailout packages.

But as negotiations stalled and ultimately broke down, Greece’s economy began to tank. After ­being closed all week and capping ATM withdrawals at a meager 60 euros — about $67 — banks on Friday were just days from running out of cash, according to senior Greek banking officials.

The National Bank of Greece’s chairwoman, Louka Katseli, told the Reuters news agency that there was $1.1 billion left in the system – only enough to last until Monday.

Without any cash in the ATMs, business could quickly halt across Greece. And without further support from the European Central Bank, the country could start down the road toward an exit from the euro zone and a return to its former currency, the drachma.

That sort of acute crisis is what “yes” supporters said Friday they are desperately seeking to avoid. At their rally, people spoke of their deep allegiance to Europe and said they feared a “no” vote would cast them out of the club.

The well-dressed crowd waved Greek and E.U. flags as they chanted “Greece, Europe, Democracy,” booing whenever Tsipras’s name was mentioned. The stage was less star-studded than the pop-star-dominated “no” festival, with an elementary school teacher and an engineer testifying for their love of the European Union.

The past five days of shuttered banks, long lines at ATMs and a missed payment to the International Monetary Fund were a preview of what is to come if Tsipras prevails, many said.

“We are frozen. We cannot import here because we are not able to pay suppliers” after Greeks were banned from transferring money abroad on Monday, said Alexia Chrysochoidis, 32, who works at her family’s chemical distribution business. “We have checks in our hands which are worthless because we can’t go to the banks to cash them.”

Many people said they felt trapped between two terrible choices. A “yes” vote will unleash more austerity, the same recipe that many economists say compounded Greece’s woes during five years of E.U.-sponsored bailouts. But a “no” vote would be even worse, said Erato Yerolymbos, 39, a museum designer who came to the rally with her husband and 8-month-old daughter.

“It’s like you’re going to jump off a cliff, and you have two choices,” she said. “You can hold your knees to your chest and try to protect yourself a little bit. Or you can jump with your arms and legs out, and you’ll break all your bones.”

At the “no” rally, demonstrators said they were ready for the leap.

“I won’t cry. I won’t be afraid. I will vote ‘no,’ ” they chanted as the last rays of sunlight glinted off the Acropolis.

Speakers cast their struggle not only as a final stand for Greece but also as one last chance for Europe to turn away from austerity policies that they said had inflicted pain and deepened inequality across the continent.

“All of Europe is against Greece,” said George Kimoulis, a prominent Greek actor who emceed the event. “But Greece will fight for the whole of Europe.”

Read more

7 questions about Greece’s huge crisis

Bankruptcy is a real possibility for Greece. Does its leader have a plan?

Why Greece and Germany just don’t get along, in 15 charts