New ministers in the Greek government have been sworn in after a reshuffle within Syriza’s ranks following a rebellion over tough bailout terms.

Prime Minister Alexis Tsipras sacked several dissidents from his cabinet in a move that marks a split with his party’s main leftist faction.

Despite the revolt, parliament approved the bailout which requires more painful measures in return.

The newly-appointed Labour Minister George Katrougalos says the

government, elected on an anti-austerity platform, will fight for an agreement that is “socially just”.

The new Energy Minister Panos Skourletis, a close Tsipras ally, says the reshuffle marks the government’s adjustment “to a new reality”.

New Greek ministers sworn in after reshuffle http://t.co/nctLhPr85Ypic.twitter.com/HyGjEEWhZO — Kathimerini English (@ekathimerini) July 18, 2015

The leadership argues it’s being forced to swallow medicine it doesn’t like to keep Greece in the euro.

“We are fully aware of how bad this agreement has been and of all the hard measures it contains. We’re betting on finding ways to counter-balance those measures in order to help the poor and the needy,” said new government spokeswoman Olga Gerovassili.

Former Energy Minister Panagiotis Lafazanis and two deputy ministers were sacked in a reshuffle that had been expected ever since the rebellion left Tsipras dependent on the votes of pro-European opposition parties to get the deal passed.

The prime minister has ruled out immediate early elections before a bailout deal is actually agreed, but Interior Minister Nikos Voutsis said this week that elections may come in September or October.

Euronews correspondent Stamatis Giannisis reported from Athens:

“The cabinet reshuffle was unavoidable for prime minister Tsipras after key radical left-wing ministers refused to support the new deal with the country’s creditors. The question now is whether this revamped Syriza-led coalition will be able to implement the austerity provisions in this agreement without further political losses.”