A day before going into default by missing a $1.7 billion payment to the International Monetary Fund, Greek Prime Minister Alexis Tsipras gave the European Union one last chance to save his country, now on the verge of bankruptcy.

In a letter to Eurogroup President Jeroen Dijsselbloem, Tsipras asked for an extension of the country’s bailout program, which expires at midnight, as well as a two-year loan to cover its upcoming debt obligations. He said it was needed “for a short period of time in order to ensure a technical default is not triggered.”

Greek banks are closed this week because a line of credit from Europe is cut off; if they opened, many would likely fail. It’s unclear whether a loan from European finance ministers, who will hold an emergency conference call to discuss the request this evening, would be enough to get them to reopen.

Tsipras is urging Greeks to vote “no” on a July 5 referendum to decide whether to accept the terms of Europe’s bailout. He’s arguing that would force Europe to acknowledge the wishes of Greek voters and ease its austerity terms. Now, if Europe rejects the loan request, Tsipras can tell his people that their partners in the European monetary union denied them at their most pressing hour of need.

“If the Greek people want to proceed with austerity plans in perpetuity, which will leave us unable to lift our head … We will respect it, but we will not be the ones to carry it out,” Tsipras said on Greek television Monday night. He promised to resign if Greeks voted “yes” on the bailout referendum.

European Commission President Jean-Claude Juncker said Monday a “no” vote is a vote to leave Europe, raising the potential the referendum could be the first step in the European Union kicking Greece out of its 19-member monetary club. But according to reports, German Finance Minister Wolfgang Schaeuble said Tuesday Greece could default but stay in the eurozone.

The IMF, the European Commission, and the European Central Bank are Athens’s creditors. Their $270 billion bailout package expires at midnight.

It’s unclear how European officials would respond to adding two more years to the Greek debt crisis, already five years old. On Monday evening, they offered a last-minute deal that toed the European line on pension reforms and new taxes. In recent days, they have showed no willingness to indulge Athens any more than they already have.

Twice Monday, German Chancellor Angela Merkel — the most important leader in Europe — said Greece must make the reforms demanded by Europe if it wants to stay in the eurozone. Public opinion polls shows she’s backed by a large majority of the German public.

Tsipras has few options if Europe rejects his loan request. He could default, something Greek officials said they are comfortable doing. Russian officials have hinted they would be willing to consider a loan request from Athens, but have been silent as the crisis enters its endgame.

On Monday, China also threw its hat into the fray. As the Greek crisis sent every major stock index around the world lower, Chinese Premier Li Keqiang said he was concerned about the turbulence it was causing and that his country was ready to help.

“Even though Greece is an internal EU affair, the issue concerns China, as a key EU trading partner, but also because it affects the world’s financial stability and economic recovery,” he said after an EU-China meeting in Brussels.

“Because we want a prosperous EU, a united Europe, and a strong Europe, we want Greece to stay in the eurozone,” he added. “China is ready to play a constructive role to help Greece overcome the crisis.”