Greek Prime Minister Alexis Tsipras plans to submit his resignation Thursday to clear the way for national elections on Sept. 20, a government official said. The move comes after Greece narrowly escaped an exit from the 19-member eurozone in July following months of uncertainty after the government and its international creditors struck a bailout “aGreekment” in a reform-for-aid deal for the debt-stricken country.

The prime minister is set to stand down after losing majority backing from his party over Greece's new bailout agreement. The Syriza Party, led by 41-year-old Tsipras, won elections in January after staging a revolt against the budget cuts and other austerity measures under the bailout arranged by the European Commission, European Central Bank and International Monetary Fund (known as “the troika”). Greece's previous conservative government had agreed to those bailout terms.

Greece made a 3.2 billion euro ($3.6 billion) payment to the European Central Bank Thursday, shortly after receiving the initial disbursement of funds from its new bailout. Eurozone officials agreed last week to launch a new bailout program for Greece of up to 86 billion euros ($95 billion) over three years, the country's third bailout in five years, the European Commission confirmed Friday.

The country was teetering on the verge of collapse with a hobbled economy and more than 300 billion euros ($330 billion) of debt. The Greek government completed its abrupt about-face by accepting even more restrictive austerity terms from the rest of the eurozone last month after a Greek referendum July 5 rejected international creditors’ demands for austerity reforms. The move came after Greece defaulted on its International Monetary Fund repayment of 1.6 billion euros ($1.77 billion) at the end of June.

Greek banks reopened July 20 after being shuttered for three weeks, but capital controls that prevent Greeks from withdrawing large amounts of cash from banks have remained in place.

The cash-strapped country is dealing with a debt that’s 177 percent of its gross domestic product, more than any of the 19 nations using the euro.