Minxin Pei is professor of government at Claremont McKenna College and a nonresident senior fellow of the German Marshall Fund of the United States.

China's commercial activities in Africa, such as investments, infrastructure projects and bank lending, have long attracted scrutiny and criticism. Critics have accused Beijing of practicing a new form of economic colonialism to gain control of the continent's valuable natural resources by luring unsuspecting African nations into so-called debt traps.

While this perspective dominates the narrative about Beijing's economic ties with Africa, it likely exaggerates Chinese strategic foresight and overlooks the pitfalls of China's big bet on the continent.

As the prices of oil, copper and minerals found in Africa have plunged in the global economic meltdown, the prospects for China-funded projects look bleak. China is facing growing pressure to forgive the tens of billions of dollars of loans it has made to African countries since the early 2000s. The mistreatment of African residents in China during the outbreak has fueled cries of racism and prompted diplomatic protests against Beijing.

Even the crown jewel of China's economic engagement with Africa, the trillion-dollar Belt and Road Initiative infrastructure program, is at risk. The coronavirus has dealt a body blow to the Chinese economy, with its economic output falling 6.8% in the first quarter.

It is doubtful that Beijing will have the resources to fund the BRI in the future. One telltale sign is the absence of references in the communiques of recent Politburo meetings of the Chinese Communist Party to BRI as a priority.

In retrospect, the unraveling of China's Africa project should not come as a surprise. Beijing's strategy has been based on flawed assumptions and was executed at the wrong moment.

Chinese leaders see Africa mainly as a source of natural resources. China's fast-paced growth since the early 1990s has generated a voracious demand for oil and subsoil minerals, and Africa appeared a perfect fit since dominant multinationals had a weak hold on the continent and Beijing could easily outbid them to gain equity stakes in mines and oil fields.

For unknown reasons, the Chinese government believed that, as an equity holder and creditor, it could better ensure secure access to critical raw materials there.

As a result, China has opened its checkbooks and become the most active nontraditional lender in Africa. According to the China Africa Research Initiative at Johns Hopkins University, China loaned $152 billion to 49 African countries between 2000 and 2018. The World Bank estimates that, as of 2017, the value of China's loans to sub-Saharan African countries was $64 billion, or more than 60% of the stock of bilateral debt.

Besides showering Africa with credit, China has bet big on direct investments, mainly through its state-owned enterprises. Between 2008 and 2018, Chinese FDI in Africa rose from $7.8 billion to $46 billion, according to official data.

On paper, China may seem to have got its money's worth. Merchandise trade between China and Africa rose from $107 billion to $204 billion in 2018, based on data provided by the Chinese government.

But the question is whether China could have expanded its trade with Africa and maintained its access to raw materials without committing nearly $200 billion in bilateral loans and FDI in a distant continent full of political and economic risks.

In all likelihood, China might not have paid more for the same raw materials had it chosen to purchase them on the open market. Beijing's hope that direct or semi-direct control of resources would provide greater security is illusory.

For one thing, once China extended the credit or made the direct investments in mines, oil fields or roads, it was at the mercy of the recipients, Africa's national governments and political elites. China has no power to prevent the nationalization of its investments or defaults on its loans.

Xi Jinping talks with Senegal's President Macky Sall during his visit to Dakar in July 2018: once China extended the credit or made the direct investments, it was at the mercy of the recipients. © Reuters

If supply disruption occurs because of conflict in Africa or along China's long sea lines of communication, the theoretical advantage of direct control will be worthless because China, at least for the foreseeable future, lacks the military capabilities to protect its mines and railways in Africa or escort its merchant ships on a sustainable basis.

China's gamble in Africa also flopped thanks to bad timing. Its foray into the continent coincided with the peak of the most recent commodity supercycle, skyrocketing prices of raw materials, this time driven by Chinese demand. As a result, Chinese companies paid top price for assets that most probably have lost huge value after the collapse in commodity prices.

Now that the coronavirus outbreak is about to devastate Africa's fragile economies and societies, China needs a pragmatic exit strategy. Beijing must realize that it is unlikely to recover most of its sunken investments or loans because of the economic impact of the virus on Africa.

The only sensible policy flowing from such a reckoning is to write off its loans as a humanitarian gesture. But this dramatic step will be a bargain since it will earn Beijing goodwill, with the money that it has no realistic hope of recouping.