BRUSSELS, Belgium -- The International Monetary Fund has agreed to give Ukraine a new bailout deal worth 15.5 billion euro ($17.5 billion) that could climb to around $40 billion over four years with help from other lenders like Europe and the U.S.

Ukraine has so far received $4.6 billion as part of an earlier $17 billion aid package the IMF agreed on last year, but that program has run into trouble as the war ravaging the country's eastern region has weighed on economic prospects.

Facing bankruptcy, Ukraine last month asked the IMF to replace its program with a new one to restore confidence in its finances and help it meet its debt obligations.

"This new program offers an important opportunity for Ukraine to move its economy forward at a critical moment in the country's history," IMF Managing Director Christine Lagarde said Thursday.

The announcement came just before leaders of Russia, Ukraine, France and Germany emerged from marathon talks to announce a peace deal for eastern Ukraine.

The four-year package "would support immediate economic stabilization in Ukraine as well as a set of bold policy reforms aimed at restoring robust growth in the medium term and improving living standards for the Ukrainian people," Lagarde said.

The Ukrainian government and central bank welcomed the announcement.

"This is a very important financial deal for providing reform of Ukraine," President Petro Poroshenko told reporters after talks with European Union leaders in Brussels. "And now for the successful reform we need just one precondition: peace."

Kyiv has also received loans from the European Union and the United States, both of whom have recently promised more help. The World Bank said Thursday it will provide up to $2 billion this year.

Lagarde said Ukraine would have to commit to reforming its economy further in return for the help. The country is particularly focused on reducing corruption and red tape and making the economy more energy efficient.

She praised Kyiv's efforts in healing public finances, saying the government has "not only reached their targeted deficit for this year but they have exceeded the objective and produced a better result than was expected."