Greek voters go to the polls Sunday to elect a new government. It’s possible that the outcome of this election could determine whether Greece stays in the euro or not. This means the fate of Europe — and the global economy — just might hang in the balance.

Why is Greece’s euro membership at stake?

Recall Greece’s basic problem: The country racked up many billions of dollars in debt that it can’t repay without help. In February, the European Central Bank, the European Commission and the International Monetary Fund (together, the three are known as the “troika”) agreed to renegotiate Greece’s debts with lenders and give Greece a $170 billion bailout. In return, the Greek government agreed to a series of spending cuts and tax hikes. These austerity measures are extremely unpopular with voters. Yet if Greece rejects the bailout, it might have no choice but to leave the euro.

So what are the choices facing Greek voters?

Two parties are at the top of the polls at the moment. The leading conservative party, New Democracy, helped negotiate the bailout with the troika and has largely promised to “find common ground” on the agreement, albeit with some modifications to ease the pain for Greece. The other front-runner is a leftist coalition party called Syriza, whose leader, Alexis Tsipras, has said that he’d like to drastically revamp the troika agreement.

What if New Democracy wins?

New Democracy’s leader, Antonis Samaras, will first have to form a coalition government with a variety of smaller parties on the left — not an easy task — and then figure out a way to make the troika agreement work. Already, euro-zone officials have said they are open to small modifications to the deal, from allowing Greece slightly more flexibility to repay its loans to investing more money to help Greece grow. If the two sides can reach an agreement, that might enable Greece to stay within the euro.

What if Syriza wins?

That’s more uncertain. While Tsipras has said that he’d like Greece to stay in the euro, it’s unclear if he can make that work. For one, analysts say, Syriza will probably have difficulty forming a coalition government. And even if Tsipras can pull that off, many elements within his coalition are demanding a radical renegotiation of the bailout — which may cause the troika to balk and stop sending money to Greece. In the worst case, the country would face a cash crunch and Tsipras would have little choice but to nationalize the banks and introduce a new currency.

Would an exit from the euro really be calamity?

Many economists seem to think so. A Greece exit from the euro would probably be accompanied by a collapse of the domestic banking sector and steep inflation. “Greece would be forced into a crisis many times more severe than its present one, further fueling social unrest,” five Greek economists wrote Friday in the Wall Street Journal. Perhaps more significant, a Greek exit could accelerate bank runs in other troubled euro countries, such as Spain and Italy, as investors and depositors got nervous that those countries were next. A total collapse of the currency union would suddenly look like a real possibility.

So is there any hope that Greece will pull through?

Perhaps — although it won’t be easy. Elias Papaioannou, a Greek expert at Dartmouth College, points out that even if New Democracy wins on Sunday, several things will need to happen to calm the panic. First, the troika will need to be willing to relax the terms of the bailout agreement to placate Greek voters. (One possibility? Offering money to finance extended unemployment insurance in Greece.) Second, the new Greek government will have to figure out how to rebuild Greek’s battered banking sector. And third, euro-zone officials will have to restore confidence in the entire euro zone — not just in Greece, but in troubled countries such as Spain, as well.

“Greece’s biggest problem right now is not austerity, per se, although that’s a problem,” Papaioannou says. “The biggest problem is uncertainty about the currency. That’s impeding investment. If that uncertainty isn’t resolved, none of these plans will work.”