The ants are flying in Kenya at the moment.

During this rainy season, swarms can be seen leaving the thousands of anthills in and around Gilgil, a quiet agricultural town in Kenya's Rift Valley that has emerged as the centre of a booming illegal trade.

The mating ritual sees winged males leave the nest to impregnate queens, who also take flight at this time. This makes it the perfect time to chase down queen ants to sell on to smugglers who are at the heart of a growing global black market, that taps into the pet craze for keeping ants in transparent enclosures designed to observe the insects as they busily build a colony.

It is the giant African harvester ant queens, which are large and coloured red, that are most prized by international ant collectors – one can fetch up to £170 ($220) on the black market, which tends to operate online.

A single fertilised queen is able to create a whole colony and can live for decades – and can be easily posted as scanners do not tend to detect organic material.

"At first, I did not even know it was illegal," a man, who asked not to be named, told the BBC about how he had once acted as a broker, linking foreign buyers with local collection networks.

Also known as Messor cephalotes, these ants are native to East Africa and known for their distinctive seed-gathering behaviour making them popular with ant collectors.

"A friend told me a foreigner was paying good money for queen ants - the big red ones which are easily seen around here," the former broker said.

"You look for the mounds near open fields, usually early morning before the heat. The foreigners never came to the fields themselves - they would wait in town, in a guest house or a car, and we would bring the ants to them packed in small tubes or syringes they supplied us with."

The scale of the illicit trade in Kenya became apparent last year when 5,000 giant harvester ant queens - mainly collected around Gilgil - were found alive at a guest house in Naivasha, a nearby lakeside town popular with tourists.

The suspects - from Belgium, Vietnam and Kenya - had packed the test tubes and syringes with moist cotton wool, which would enable each ant to survive for two months, according to the Kenya Wildlife Service (KWS).

The plan was to take them to Europe and Asia and put them up for sale.

This trade in ants has caught scientists and the authorities by surprise.

The East African nation is more accustomed to high-profile wildlife crimes involving elephant tusks and rhino horns.

UK-based retailer Ants R Us describes the giant African harvester ant as "many people's dream species" - though the queens are currently out of stock, with the site explaining that it is very hard for retailers to source them.

"Even I, as an entomologist, have been surprised at the extent of the apparent trade," Dino Martins, a biologist based in Kenya, where there are around 600 kinds of ants, told the BBC.

However, he can understand the fascination with East Africa's harvester, with colonies created by a "foundress queen", who can grow up to 25mm (0.98 inches) and who produces eggs throughout her life.

"They are one of the most enigmatic species of ants - they form large colonies, engage in interesting behaviours and are easy to keep. They are not aggressive."

During the swarming he says the queens mate with several males.

"Then that is it for the males - their job is done… most are eaten by predators or die," the entomologist says, going on to explain how the queen then scurries away to dig a small burrow and begin laying eggs to start her empire.

Her workers and soldier ants, those that protect the nest, are all female and will eventually number in the hundreds of thousands.

"Nests can live for over 50 years, perhaps even up to 70 years. I personally know of nests near Nairobi that are at least 40 years old as I've been visiting them for that long," said Martins.

This means the queens live that long too - because as soon as she dies, the colony collapses and any surviving workers will look for another nest.

Kenyans who have had to deal with ants raiding their crops or invading their houses know this well - and to get rid of a colony someone is sent in to locate the queen, often hidden deep in one of the tunnels or chambers of an ant mound.

The former broker said ants could also be harvested by gently disturbing the mound and collecting them as they tried to escape.

"It was only when I saw the arrests on the news that I realised what I had been part of - and I immediately quit," he said.

Those arrested were convicted on charges of biopiracy and ordered to pay fines or serve 12 months in jail - they opted to pay the $7,700 fee and the foreign nationals left the country.

Two weeks ago, a Chinese national - be the alleged mastermind behind last year's ring and who is said to have escaped using a different passport, was arrested at Nairobi's Jomo Kenyatta International Airport (JKIA) with another 2,000 queen ants packed in test tubes and tissue rolls.

For Zhengyang Wang, who was part of a team of researchers who published a report on the ant trade in 2023 focusing on China, this is a worry and could "wreak havoc" with local ecosystems.

"Initially, we were very excited when we learnt that many people have taken up keeping ants," Wang, assistant professor at Sichuan University, told the BBC.

"A colony of pet ants are often kept in a formicarium, which is basically a transparent plastic box so that keepers can observe colonies at work, digging tunnels, collecting food, and guarding their queen. I'd say it's quite charming and… can be a good way of educating people about insects and their behaviour.

"But then we realised, wait, isn't keeping invasive species incredibly dangerous?"

Monitoring online sales - of more than 58,000 colonies - in China over six months, the researchers found that more than a quarter of the traded species were not native to China - despite it being illegal to import them.

"If the trade volume of invasive ants continues to grow, it's only a matter of time before a few escape from their formicaria and become established in the wild," said Wang.

The study he worked on, published in the journal Biological Conservation, explained what could happen in the case of giant African harvester, one of the most traded species in China: "For example, Messor cephalotes, an East African native, is among the largest seed harvesters in the world and could potentially disrupt predominantly grain-based agriculture in south-eastern China."

The environmental consequences are also a concern in Kenya.

"Harvester ants are both keystone species and ecosystem engineers. They harvest seeds of grasses, and other plants and in so doing also help to disperse the seeds," said Martins, adding that the insects "create a more healthy and dynamic grassland".

Mukonyi Watai, a senior scientist at Kenya's Wildlife Research and Training Institute, shares these fears.

"Unsustainable harvesting - particularly the removal of queen ants - can lead to colony collapse, disrupting ecosystems and threatening biodiversity," he told the BBC.

It is possible to collect ants legally in Kenya - in line with various international treaties - with a special permit, which would require the buyer to sign a benefit-sharing agreement with the local community involved to split any profits.

But, according to the KWS, so far none have been applied for - with the paperwork also requiring details of how many ants are being collected and their destination.

Some conservationists are now calling for greater trade protections for all ant species under the Convention on International Trade in Endangered Species (Cites), the global wildlife trade treaty.

"The reality is that no ant species is currently listed under Cites," Sérgio Henriques, a researcher into the global ant trade, told the BBC.

"Without international treaties monitoring these movements, the scale of the trade remains largely invisible to policy makers and the global community," he said.

But for the KWS the real problem is more immediate - how to monitor and clamp down on "under-reported" insect trafficking, with the agency suggesting better surveillance equipment at airports and others border points would be a good start.

Martins agrees: "It is likely only a fraction of the actual ants being traded that are being detected, so one can only guess at the scale for now."

Journalist Charles Onyango-Obbo argues that Kenya is overlooking a significant global revenue opportunity.

"The ants are not finite items like gold or diamonds. They are biological assets that can be bred and farmed, and their production can be scaled up to thousand a day. Yet we treat them like stolen artefacts," he recently wrote in Kenya's Daily Nation newspaper.

In fact, Kenya's cabinet did approve policy guidelines last year aimed at commercialising the wildlife economy, including the ant trade.

"The guidelines seek to promote sustainable use trade of wild species such as ants to generate jobs, wealth and community livelihoods across all the counties," said Watai.

With careful monitoring in place, it could be that future farmers around Gilgil will have special formicaria on their land expanding the yields from their fields and orchards - full of vegetables and fruits - to include lucrative queen ants.

But the debate over the dangers of exporting ants to hobby collectors in different parts of the world is yet to be settled.

Additional reporting by Osmond Chia in Singapore

Go to BBCAfrica.com for more news from the African continent.

Follow us on Twitter @BBCAfrica, on Facebook at BBC Africa or on Instagram at bbcafrica

As society becomes more dog friendly, what does it mean for those who don't see them as man's best friend?

From school poems and global headlines, the search for escaped Samba has taken on a life of its own.

African and Caribbean nations want countries which benefited from slavery to pay compensation but it will not be straightforward.

The divisive 41-year-old was among the country's most prominent influencers.

Geumseong survived a dangerous journey to South Korea, but his mother is stuck in a Chinese prison and may be forcibly repatriated.