Late last month in Nairobi, Li Xuhang, China's ambassador to Kenya, threatened a trade war with the East African nation. This came after a call from Kenya's President Uhuru Kenyatta to halt imports of Chinese tilapia, which he believed were flooding the market and harming the local fishing industry. The Chinese government responded angrily, saying it would impose its own sanctions on Kenya. It also warned that it could pull phase-two funding of the Standard Gauge Railway (SGR), which will link Nairobi with Mombasa, Kenya's main Indian Ocean port. The SGR has been financed by the People's Republic and, at an estimated cost of $3.2 billion, is the most expensive post-independence infrastructure project in Kenya.
After a few days, the rhetoric cooled. The tilapia ban went ahead, but China walked back on its threat of retaliatory action, saying that its strategic partnership with Kenya would not be affected and that it would not "even associate the issue of fish import with other co-operative projects". It also promised that it would continue to foot the bill for the SRG. However, these events illustrate a growing tension in Sino-African relations.
In recent years, China has offered an appetising menu to African leaders: loans, development aid and infrastructure funding, in exchange for access to the continent's abundant natural resources and emerging markets. For example, as part of its Belt and Road Initiative, China has financed a $4bn railway connecting landlocked Ethiopia with the port of Djibouti, where it has also opened the first phase of a $3.5bn project to create Africa's largest free-trade zone. Meanwhile, in Zambia, it is building a $548m cement plant.
With Chinese foreign policy underpinned by the principle of non-intervention in the sovereign affairs of other nations, such investment has come – conveniently for many African leaders – free of conditions or criticism on matters of democracy and human rights.
As China's role in Africa has matured, the results of its investments have begun to be seen. Among the successes lie half-finished projects, such as a widely reported ghost town in Angola, environmental damage and spiralling debt. The Ethiopian railway project came in 30 per cent over budget. Although it was originally meant to be paid off in 10 years, in September China agreed to extend the repayment schedule to 30 years. Now, across the continent, there are increasing concerns that African nations are selling their souls to China.
In recent months, China has faced a growing backlash – not from governments, but from everyday people. Nowhere has this been more apparent than Kenya, which owes 72 per cent of its bilateral debts to China. Kenyan civil society is dynamic, and its media operates largely unhindered. Headlines have criticised China's role in national affairs, and stories have emerged of mistreatment of Kenyan workers on the SGR project. In September, Kenyan authorities arrested a Chinese businessman after a video surfaced online of him calling Mr Kenyatta "monkey people". The country's social media community has been incandescent about all of these issues.
In copper-producing Zambia, a nation heavily in debt to Beijing, China has been accused of using loans to create openings in government-run bodies, such as the national electricity company and the state broadcaster. The Zambian government denies these claims, but that didn't stop protesters taking to the streets of Lusaka in September. Some wore T-shirts emblazoned with the slogan "sayno2china"; one man carried a banner reading "China = Hitler".
Such expressions of dissent follow a hundreds-strong gathering in Uganda last year. There, members of the crowd voiced their fury that an influx of Chinese entrepreneurs had entered the country as major investors, then proceeded to set up shop as small traders, undercutting local businesses.
These tensions have come at an important moment. In September this year, 53 African leaders gathered in Beijing for the seventh Forum on China-Africa Cooperation (Focac), where President Xi Jinping unveiled a new pledge of $60bn in financing for the continent.
Many have described China's relationship with Africa as neo-colonial, but it is a thoroughly contemporary strategy. It is also not clear that it is an entanglement that African nations need to enter into, in order to develop. What is true is that the US and former colonial powers are sore that they have missed the boat in Africa. For many years, the West framed Africa as a place of war, famine and disease. China, however, saw opportunity – in addition to its natural resources, Africa is the world's fastest-growing continent and has a "youth bulge" that could pay great dividends in the future.
Back in January, I was in Gambia when US President Donald Trump made headlines by describing African nations as "s***holes". This outrageous comment neatly underscored the US attitude to Africa. There is now recognition within the Trump administration that such views, and decisions to cut back USAID, were bombastic exercises in self-harm, and that Africa is, in fact, an important theatre for US interests.
In recent months, Mr Trump has been harshly critical of his predecessor Barack Obama's record in Africa. Following the Focac meeting, the US said it would counter China's influence by doubling its financing on the continent. There are also plans to embolden the Overseas Private Investment Corporation to involve itself in African business and infrastructure projects.
Still, these belated overtures pale in comparison to what China has brought to the table. Walking through Nairobi – or, indeed, Dakar, Johannesburg or Addis Ababa – it is clear that Africa is in the midst of a shift into a post-western era. In some ways China is still working out what sort of superpower it wants to be: a global investor, one dedicated to advancing its own geostrategic interests, or some combination of both. The West retains a huge advantage in terms of soft power – young people in Lagos emulate New York street style, US hip-hop is everywhere and Mr Obama's face still adorns battered old buses in Nairobi's shanty towns − but there are limits to that.
Many African leaders are clearly happy to be wooed by China, but the past few months have shown that the continent's vibrant and vocal civil societies will not be forced into a marriage that they don't want. If Africa is to achieve an equitable relationship with its latest benefactor, its best hope lies in the desire of its people to finally shape their own destiny.