Greece and its creditors have reached a deal that will restart bailout loan payments and keep the country from facing default and reigniting a eurozone crisis this summer, officials said Tuesday.

Following months of tough negotiations, the sides agreed that Greece should make another round of pension cuts in 2019 and commit to maintain a high budget target once the current bailout program ends next year.

Prime Minister Alexis Tsipras' left-wing government is set to approve the new cuts in parliament by mid-May, so that finance ministers from the nations using the euro can unfreeze more bailout funds at a scheduled meeting on May 22.

Tsipras' governing coalition has a majority in parliament of just three seats.

Greece has been surviving on bailout loans since 2010 in return for harsh spending cuts and tax increases that have put nearly a quarter of the workforce out of work and seen more than a third of the population living in poverty or at risk of poverty.

"We have said many times ... that this is a painful compromise," Interior Minister Panos Skourletis told state-run ERT television.

Conservatives lead polls

Tsipras' governing Syriza party is trailing badly behind rival conservatives in the polls, and he has insisted it will not seek elections until his term ends in 2019.

The agreement with creditors was reached after a nightlong session of talks at a hotel in Athens. Government officials said lenders dropped their demands to abolish a long list of employment rights and also agreed to the expansion of benefit schemes for jobless and low-income families.

Hours before the deal, protesters had gathered at the entrance of the hotel during large May Day rallies in the capital, but riot police blocked them from entering the building.

Agreement hailed

The European Commission, International Monetary Fund and European financial institutions welcomed the agreement and noted that "the Greek authorities have confirmed their intention to swiftly implement this policy package."

They said in a statement that the deal "will now be complemented by further discussions in the coming weeks on a credible strategy for ensuring that Greece's debt is sustainable."

EU Economic and Financial Affairs Commissioner Pierre Moscovici said "it is time to turn the page on this long and difficult austerity chapter for the Greek people. With this agreement, we need now to write a new story of stability, jobs and growth for Greece and for the euro area as a whole."

Tsipras' government, which rose to power on an anti-bailout platform, had initially aimed at finalizing the current round of negotiations with creditors last December.

The delay has threatened hopes to return to economic growth after years of recession and stagnation fueled by austerity measures and a reversal of chronic overspending by the state.

Greece faces a spike in bailout loan repayments in July, and needed to unlock the additional funds to avoid the threat of bankruptcy.