NEW YORK (Reuters) - Colombia is drawing up plans to hedge against declines in the price of crude, its main export, the country’s finance minister said on Friday, following in the footsteps of Mexico, which successfully used one during the 2014-2016 price slump.

Mauricio Cardenas said “it is the right time” for Colombia to start thinking about implementing an oil hedge for the first time, adding that the country would need to reshape its legal framework to allow the government to lead a potentially risky financial transaction.

“Colombia needs to do something like what Mexico has (done),” Cardenas told Reuters in an interview in New York. “As oil prices recover and seem to be higher now than what they probably will be in the long term, this would be the right time to hedge.”

Colombia once earned roughly a fifth of its national income from oil revenues, royalties and taxation, but that figure fell to nearly zero during the global decline in crude prices in 2014.

The country would need to change its laws to remove liability from public officials as they carry out those hedges, which could run into controversy in Congress, especially in an election year.

Colombians will elect a new Congress in March and a four-year president in May. President Juan Manuel Santos is serving his second term and is not allowed to run again.

Cardenas said he wants to start the creation of a legal framework “so that in the future hedging becomes the norm, not the exception.”

“This is one of the things I’d like to do before the end of this administration, I think it would be a good thing to leave for the next administration to complete,” he said.

A hedge would allow Colombia to stabilize oil revenues in the event of a slide in prices. The downside is that if prices improve the cost of the hedge is a loss.

Mexico, for example, likely profited little from its 2017 hedge as prices rebounded well above its bet that a barrel would average around $42. However, in 2016 Mexico saw a $2.65 billion payout from its oil hedge.

Oil has rebounded from 12-year lows of under $30 per barrel in 2016. Even after a 10 percent slump this week, it still closed at just over $59.

The recovery in oil prices has filled the coffers of Colombia’s state-controlled oil company Ecopetrol, which over the last year has reduced its external debt by $3 billion to $15 billion, according to Cardenas.

The minister said Ecopetrol has between $4 billion and $5 billion in cash in hand that could be used for additional repayment of external debt. The company’s results, due out in coming weeks, will positively surprise markets in terms of dividends and revenues to the Colombian government, Cardenas said.

“We had a number of years where Ecopetrol did not provide any revenues to the Colombian government. Now we’re going to start seeing those revenues again.”