Johannesburg - South Africa’s economy regained the position of Africa’s largest in dollar terms more than two years after losing it to Nigeria as the value of the nations’ currencies moved in opposite directions.

Based on gross domestic product at the end of 2015 published by the International Monetary Fund, the size of South Africa’s economy is $301bn at the rand’s current exchange rate, while Nigeria’s GDP is $296bn. That’s after the rand gained more than 16% against the dollar since the start of 2016, and Nigeria’s naira lost more than a third of its value after the central bank bank removed a currency peg in June.

Both nations face the risk of a recession after contracting in the first quarter of the year. The Nigerian economy shrank by 0.4% in the three months through March from a year earlier amid low oil prices and output and shortage of foreign currency. That curbed imports, including fuel. In South Africa, GDP contracted by 0.2% from a year earlier as farming and mining output declined.