SA has overtaken Nigeria to become once again, Africa’s biggest economy.

It was a position that South Africa had held until Nigeria claimed the spot in 2014. South Africa has made a comeback, albeit, a small one.

Nigeria was assessed as the continent’s largest economy in April 2014 when authorities in the West African nation overhauled their GDP data for the first time in two decades.

The recalculation saw the Nigerian economy in 2013 expand by three-quarters to an estimated 80 trillion naira, the countries economy has however lost traction and slid down enough for SA to once again come on top.

The new calculations that verified that SA beats Nigeria in economy are based on the International Monetary Fund’s gross domestic product numbers for the two countries in 2015. The economic position being considered is in dollar terms.

South Africa and Nigeria have had their currencies moving in opposite directions against the dollar. While the South African rand saw a gain of around 16%, the naira has lost a third of its value since effectively abandoning its peg to US dollar.

Based on gross domestic product at the end of 2015 published by the International Monetary Fund, the size of South Africa’s economy is $301 billion at the rand’s current exchange rate, while Nigeria’s GDP is $296 billion. SA beat Nigeria by just $5 billion.

Despite this good news for South Africa, both countries still face a risk of a recession after contracting in the first quarter of the year. South Africa’s GDP contracted by 0.2 per cent although SA’s rand rallied as investors turned to emerging markets with liquid capital markets to seek returns after Britain voted to leave the European Union on June 23.

zuma and rand

The country’s central bank still forecasts that the economy won’t expand this year and the nation risks losing its investment-grade credit rating. The Nigerian economy, on its own end, shrank by 0.4 percent earlier this year amid low oil prices output and shortage of foreign currency.

Investors did not flock to buy naira-based assets after authorities removed the peg of 197-199 naira per dollar. The Central Bank of Nigeria raised its benchmark interest rate to a record in July to lure foreign money, even as the IMF forecast the economy will contract 1.8 percent this year.