Ecuador said it has reached an agreement with two Chinese lenders – the China Development Bank (CDB) and the Export-Import Bank of China – to lower debt payments by $1.42 billion over three years.

The country will now pay $745 million to CDB through 2024, down from $1.4 billion, and $679 million to Eximbank through 2025, down from $1.83 billion, the finance ministry said in a statement. The agreement also includes a six-month grace period, the ministry added.

Ecuador also lowered interest rates on the loans and extended the due dates to 2027 for CDB and 2032 for Eximbank, the ministry said.

The country will pay rates between 0.3% and 0.95% to CBD and between 0.2% and 0.55% to Eximbank, the ministry added.

The agreement also calls for a “softening” of Ecuador’s obligation to repay the debt with oil shipments, according to the finance ministry.

“The idea is some of the oil will be released and allowed to be sold at market prices, which is an additional benefit,” Finance Minister Pablo Arosemena said in the statement.