The Asset Management Corp. of Nigeria, which was set up by the West African nation to buy bad debts from banks, said losses narrowed in 2017 as the economy rebounded from its worst contraction in more than two decades.

The loss for the year through December narrowed to 16.4 billion naira ($45.3 million) from 164.9 billion naira in 2016, according to Executive Director Aminu Ismail. Gross earnings increased by 23 percent to 341.8 billion naira as the agency “benefited from a recovery in the economy,” Ismail told reporters in Lagos Thursday.

Amcon’s performance is in stark contrast to 2016, when chief executive Ahmed Kuru said the weak economy was hindering efforts to recover loans and other assets it took on in 2011. The Abuja-based institution acquired 12,537 non-performing loans worth 1.7 trillion naira from 22 financial institutions, following the 2009 banking crisis, according to its website.

A 21 percent increase in interest income to 42.6 billion naira as well as the 41 billion-naira sale of Keystone Bank helped boost performance even as operating expenses rose by 16.2 percent, Ismail said.

“If the economy continues with a positive outlook,” Amcon expects to return to profit this year, Ismail said.

The economy of Africa’s biggest oil producer expanded 1.95 percent in the three months through March from a year earlier, after contracting in 2016. It is forecast to grow 2.1 percent this year by the International Monetary Fund.