Alexis Tsipras, Greece's prime minister, speaks at the No rally in Syntagma Square, Athens. | EPA What happens if Greece stays or goes The real question about Sunday’s referendum is what follows for Greece and its place in Europe.

ATHENS — As Greeks head toward a weekend referendum that has become a vote on their membership in the euro, the bigger question is what happens in the days and weeks that follow.

Regardless of how Greeks vote, the country will face a daunting set of political and economic challenges that will both test its social cohesion and determine its place in Europe.

In Sunday’s poll, the question posed to Greek voters is whether they endorse the budget cuts, tax hikes and economic overhauls creditors have demanded in exchange for aid, a package that was proposed to them a week ago. From a practical standpoint, that question is now moot because Greece’s bailout expired Tuesday and the offer underlying the referendum is no longer on the table.

Prime Minister Alexis Tsipras called the vote last Saturday, thinking it would give him the upper hand in the final hours of talks. Instead, it enraged creditors and negotiations collapsed.

Now the vote is seen by many in Greece and beyond as a proxy for the country’s commitment to the euro and even to the EU, although Tsipras denies that, and opinion polls continue to show a strong majority of Greeks want to keep the common currency.

“On Sunday, we are not just deciding that we are staying in Europe, but that we are deciding to live with dignity in Europe,” Tsipras told tens of thousands of No supporters at a rally in central Athens on Friday night, reassuring them that a No doesn’t mean quitting the euro.

There is some support for that idea in Brussels.

Donald Tusk, the president of the European Council, told POLITICO this week: “For me it’s very clear that the referendum is not voting for Greece about being in the eurozone or not ... I hope nobody’s interested in this kind of choice.”

European Commission President Jean-Claude Juncker and German leaders have taken a more pessimistic view in recent days, however.

The outcome is too close to call. A poll Friday put the Yes and No camps in a statistical dead heat with nearly 15 percent of the electorate undecided.

If the Greeks say No

A No vote could thrust the country into chaos, triggering the collapse of its banks and choking off Greece’s access to a range of essential imports, from gasoline to medicine and food. A return to the drachma could be the result, eurozone officials and economists say. What has been an economic crisis could become a humanitarian one.

“It will be like war,” said Yannis Koutsomitis, an Athens-based political analyst.

Tsipras argues that a No would strengthen his hand in renewed talks, and that negotiations on a third rescue package and a write-down of Greek debt could begin based on conditions Athens sent to its creditors early last week. But European officials have made it clear they are not interested in those terms, saying they would take it as confirmation that Greece wants to leave the common currency.

A No vote also puts into doubt the European Central Bank's commitment to continue providing emergency liquidity to Greek banks, currently at €89 billion. Greek banks only have €1 billion in liquidity, allowing them to operate only until Monday before running out of cash. Without the support Greece's financial sector could collapse. Unable to repay debts, like an upcoming €3.5 billion owed to the ECB on July 20, and having difficulty paying salaries and pensions, the Greek government may be forced to issue IOUs or scrip, essentially introducing a parallel currency.

If Tsipras fails to make good on a pledge to secure a new deal within hours of a No vote, he would come under intense pressure to step down, as Greeks see that the referendum may push them out of the euro.

“People will quickly see who is to blame. If democratic processes are observed, I think it’s a question of a matter of days,” said George Prokopakis, the former president of Greek state television.

With the main opposition also discredited by the crisis, it’s far from clear who could take over.

But Tsipras may also try to hold onto power, blaming Europe for Greece's plight as he has done for months.

If the Yes vote wins

Tsipras’ days as prime minister could, but don't have to be, numbered.

Yanis Varoufakis, his controversial finance minister and a vociferous advocate for a No vote, has pledged to leave.

But Tsipras has sent conflicting signals on whether he would step down. At one point he said he would resign in the event of a Yes result, but then in an interview with Greek television said he would stay on as “the institutional guarantor of the constitution.”

“It would be difficult for him to stay,” Koutsomitis said.

One reason is that the creditor group, which includes other eurozone governments and the International Monetary Fund, has made it clear in recent days that it doesn’t trust his populist Syriza party government.

But with Greek banks likely closed indefinitely amid capital controls and an economy that is imploding, holding new elections isn’t an option in the short term.

One solution could be a national unity government that might include the more moderate faction of Syriza and the main center-right and center-left parliamentary parties.

The only question is who could lead such a constellation. The heads of Greece’s mainstream parties are blamed for steering the country into the crisis and don’t have the public’s trust to lead it out. One option may be to select a non-partisan technocrat like the country did in 2011 when Lucas Papademos, the former head of the Greek central bank, took over for several months.

Potential non-party leaders include Giorgos Kaminis, the mayor of Athens, Yannis Boutaris, the mayor of Thessaloniki, or Yannis Stournaras, the central bank governor.

“Unfortunately, we don’t have a Winston Churchill or Charles de Gaulle,” Prokopakis said.

Tsipras could also make way for Deputy Prime Minister Yannis Dragasakis. One of the founders of Syriza, Dragasakis is regarded as a more moderate voice in the party.

Does Greece stay or go?

Even if Greeks vote Yes and settle on a new leader, the country’s future in the single currency is far from certain.

Athens would only have two weeks before the €3.5 billion bond repayment in which to seal a new bailout, a complicated process that would normally take much longer. In the meantime, Greek banks would likely remain closed.

Creditors have already said they wouldn’t offer Greece a new bailout on the basis of their recent proposals because the capital controls enacted this week have done further damage to the economy, necessitating a fresh assessment.

Before a new Greek aid request could go forward, the European Commission and the ECB would have to provide a fresh analysis showing that the country’s crisis threatens the stability of the eurozone and thus merits a bailout. Given the relatively calm reaction in financial markets to Greece’s default, that could be a difficult case to make.

Assuming they do rule that euro stability is at risk, the International Monetary Fund would then have to weigh in on the sustainability of Greece’s debt and make recommendations. The IMF has made no secret of its view that Greece’s debt, which stands at about 180 percent of its GDP, isn’t sustainable and has urged the other creditors to forgive a portion of what they are owed.

Germany and other countries oppose such a step for political reasons. If anything, Greece’s default and its government’s handling of the crisis have only hardened resistance to further aid.

Finance Minister Wolfgang Schäuble, vilified in Greece as the face of Europe’s austerity demands, has seen his popularity in Germany soar because of his opposition to further concessions.

With many Germans in now in favor of a Greek exit, it would be difficult to win approval for a new bailout, much less debt forgiveness. Chancellor Angela Merkel, who has already taken criticism for selling Germans on Greece’s previous bailouts, would have to convince her people that saving Greece is in their and Europe’s best interest.

Juncker and other leaders are already making that argument. Over the past five years, the Greece debate has focused on preserving its euro membership and shielding the currency. That has shifted in recent days as European leaders now stress the strategic and cultural importance of Greece to Europe, reflecting the worry now is that Greece could drop out of the EU altogether.

Many Greeks are concerned too. For them, Sunday’s referendum not just as a vote on the euro and Europe, but as a choice between order and chaos.

“For me the Greek problem is not only about money, not about currency, not about the eurozone, but also about geopolitical context,” Tusk told POLITICO. “ As a historian, I think I have a right to say that Greece and the Balkans are the traditional soft underbelly of Europe. In fact, nothing changed. We have to be very, very cautious when it comes to dramatic decisions about to be or not to be.”