Greece reached a deal with its European lenders Tuesday for more reforms in exchange for a badly needed bailout installment so Athens could avoid possible bankruptcy.

After months of often tough talks, Greek officials agreed to more pension cuts and tax increases.

The European Commission and European Central Bank will bring the deal to their finance ministers at their May 22 meeting.

Greek Prime Minister Alexis Tsipras’ leftist government says it is confident parliament will approve the new round of cuts.

Greece desperately needs about $8 billion to meet a debt payment in July or stare possible bankruptcy in the face.

International Monetary Fund official Poul Thomsen says while the IMF welcomes the deal between Greece and its eurozone lenders, the country needs debt relief and restructuring. Thomsen says the Greek debt of close to 180 percent of its gross domestic product is unsustainable.

The IMF has balked at taking part in the latest Greek bailout unless the debt is renegotiated.

Greece has been relying on international bailouts since 2010, when the outgoing conservative government badly underreported the country’s debt.

The harsh economic reforms, including cuts in social spending and tax hikes, have caused pain and chaos for many Greeks. But the bailouts have helped Greece fend off total collapse.