Greek lawmakers agreed to form a unity government on Sunday, striking a deal that will see Prime Minister George Papandreou step down in order to secure broader support for an international financial bailout for the country.

Papandreou met with the country’s main opposition party leader, Antonis Samaras, on Sunday to agree to form the government that will lead the country “to elections immediately after the implementation of European Council decisions on October 26,” according to an e-mailed statement from the office of President Karolo Papoulias in Athens, according to Bloomberg.

The leadership of another opposition party had been expecting Papandreou to lose his position as part of a deal, with another opposition leader, George Karatzaferis, of the LAOS party, calling the prime minister’s move a “formality,” according to Bloomberg.

Papandreou won a confidence vote early Saturday after canceling a public referendum that would have allowed the public to vote on whether or not to accept conditions of an aid package to ease the country’s debt burden while also reducing the nation’s public expenses.

Papandreou dropped the referendum after the conservative New Democracy Party said it would support the finance deal.

Papandreou won early Saturday after vowing that he would not stay on. He met with Greek President Karolos Papoulias to explore forming a transitional government.

Papandreou said he was seeking a “government of wider cooperation” that will pass the financial package, which “is a prerequisite for our remaining in the euro,” Papandreou told reporters on Saturday, according to Bloomberg.

The Greek Parliament voted 153 to 145 to give Papandreou a victory.

Greece is expected to receive $11 billion next month in aid. A lost confidence vote would have meant the need for a new government and a higher risk of Greece defaulting on its debt because of the lack of a bailout package.