It once was unheard of for a Chinese person to be doing business in any of Kenya's markets.

But this year it is becoming a more common sight – something that is causing friction with small-scale entrepreneurs who feel that their livelihoods are being threatened.

The situation came to a head earlier this month when Kenya's Business Daily newspaper reported on an influx of Chinese traders who had set themselves up in Gikomba, one of the largest open-air markets in the capital, Nairobi.

It is famous for its second-hand clothes stalls – and there is big money to be made there.

Gikomba is arguably East Africa's largest second-hand clothes market – and to understand how popular these garments are in Kenya, one just has to look at the statistics: traders imported 177,160 tonnes of them in 2018 valued at about 17bn Kenyan shillings ($166m; £131m).

According to the Kenya National Bureau of Statistics, that is up from 135,868 tonnes in 2017 and 106,974 in 2014 – so it is a fast-growing market.

Kenya's love-hate relationship with Chinese traders
The market has been a magnet for traders for decades

Following the Business Daily story, which included photos of Chinese traders, there was a backlash on social media with questions about how they had been allowed to set up shop.

Three days later, the interior minister announced that seven Chinese nationals spotted trading in Gikomba were being deported as they did not have work permits and could not operate in a sector that he said had been reserved for locals.

He may have been referring to the Kenya Investment Promotion Act, which sets conditions for foreign investors, including the fact that they must promote new skills for locals and use local resources in their activities.

Yet these foreign traders could easily say they had partnered with local traders to support them and thus their role was simply to supply goods – one could argue there is no law barring that in Kenya's free-market economy.

Truly a Catch-22 situation given laws with loopholes.

Kenya's love-hate relationship with Chinese traders
People travel from near and far to do their shopping in Gikomba

No wonder that two weeks on, there is no tangible evidence to prove that the Chinese traders had the incorrect documents or that they have actually been deported.

China's newly appointed ambassador to Kenya, Wu Peng, told Citizen TV that the government had yet to provide details about the incident and urged the authorities to share their concerns so the embassy could intervene and prevent any infringements of Kenya's laws.

He also defended the presence of Chinese nationals in Kenya, stating that apart from a few illegal citizens most were there legally boosting the economy.

The fallout reveals the love-hate relationship Kenya has with Chinese investors.

Several years ago they began importing goods in bulk, selling them on to retailers at discount prices from their wholesale warehouses in Nairobi's industrial area – and at a much better value than European imports.

Local traders celebrated as they were then able to turn a good profit at their stalls – and Kenyan customers benefited too.

Kenya's love-hate relationship with Chinese traders
The market has also suffered from fires and attacks by militants

But this has turned to enmity now that Chinese investors are targeting the retail sector and selling directly to customers all manner of goods from second-hand clothes and utensils to toys and electronics.

Kenyan traders are wary of direct Chinese competition not just because they are outsiders but because they seem to have deeper pockets, greater discounts for customers and a more efficient import network.

Some of the traders are alleged to be backed by manufacturers back in China and also seem to be able to clear goods more easily at Kenyan ports.

There are concerns that if this friction is not well handled, it could lead to some form of xenophobia, which would not bode well for a country positioning itself as East Africa's destination of choice for foreign investment.

Those opposed to the influx of Chinese small-scale traders have appealed to the government to intervene but it is believed President Uhuru Kenyatta will not take any drastic measures because of Kenya's reliance on funding from China to complete major infrastructure projects.

These include:

– the 485km (300-mile) standard gauge railway from Kenya's coast to Nairobi

– the 50km Thika superhighway connecting the capital to the industrial town of Thika (also part of the A2, the Cape-to-Cairo road)

– the $25bn Lamu Port South Sudan Ethiopia Transport (Lapset) corridor project, which will have a port, oil terminal and rail links to Ethiopia, Uganda and South Sudan.

A local cartoonist's take on Mr Kenyatta's attitude showed him urging Kenyans to look at the bigger picture:

China is believed to be Kenya's largest lender, accounting for 72% of bilateral debt by the end of March 2018, according to treasury documents obtained by Business Daily.

This may have fuelled some of the social media hostility directed at China, a feeling that the government negotiated a bad deal with Beijing and taxpayers are the ones who will end up repaying the debt.

There is no data available to show how many Chinese people are in Kenya – or how many Kenyans work in China to see whether they are making in-roads into retail markets there.

What is known is that Kenya imported goods worth $3.6bn from China last year, while exporting just $111m.

That imbalance might be the reason why Kenya recently received the green light to export frozen avocados to China and the trade minister also announced Kenya would be opening up a cut-flower distribution centre in the southern Chinese province of Hunan.

For Kenya, this may be a case of the old Chinese saying: "A journey of a 1,000 miles begins with a single step".

But for things to truly flourish, Kenyans feel the East Asian giant should look to be more of a friend to smaller nations not just a banker or business partner.