Ukraine and its main creditors agreed on Thursday to restructure $18 billion of the country’s foreign debt, in a rare deal between bond funds and a wobbly, emerging-market government.

If the deal is approved by the Parliament of Ukraine, it would write off 20 percent of the nation’s foreign debt, helping to avoid a drawn-out, Greek-style negotiation with large bondholders. The terms would also offer financial relief to Ukraine during a deep recession and an armed conflict with pro-Russia separatists.

But it leaves unanswered whether lenders not represented in the negotiating committee — including, critically, Russia — would comply with the deal. The committee of creditors backing the proposal represents holders of about half of the debt.

Under the proposal, bondholders, including the California-based Franklin Templeton fund, Ukraine’s largest lender, would accept an immediate loss on the principal. The deal would allow Ukraine to delay repayments for four years, though interest rates would rise slightly. The creditors might recoup some losses after 2021 if the country’s economy returns to growth faster than expected.