Court papers show that Venezuela on Friday began paying off $1.4 billion that a panel said was owed to the Canadian mining firm Crystallex, following a disputed takeover of the company by the late-President Hugo Chavez.

To recoup its losses, Crystallex had targeted Citgo refineries, potentially forcing Venezuela to sell off its most valuable foreign asset.

Papers filed in a Canadian court say Venezuela recently paid Crystallex $425 million, while agreeing to make good on the rest by 2021. That enables them to hold onto their refineries.