Almost 5,000 years ago, Chinese physicians recommended a tea made from cannabis leaves to treat a wide variety of conditions including gout and malaria. Today, as the global market for marijuana experiences an unprecedented boom after being widely legalised, it is China that again appears to have set its eyes on dominating trade in the drug.

The communist country is well placed to exploit the burgeoning cannabis trade with more than half of the patents relating to or involving cannabis originating in China. According to the World Intellectual Property Organisation (Wipo), Chinese firms have filed 309 of the 606 patents relating to the drug.

About 147 million people – around 2.5 per cent of the world's population – use cannabis, according to the World Health Organisation. And medicinal properties of the drug are increasingly being recognised. It can be used to treat conditions ranging from the nausea caused by chemotherapy for cancer patients and chronic pain to cerebral palsy, multiple sclerosis and epilepsy.

Download the new Independent Premium app Sharing the full story, not just the headlines

Last month, Uruguay became the first country to legalise marijuana in its entirety – from growing the crop to processing and use. Yesterday it appeared that a second South American country, Peru, could follow Uruguay's example and legalise cannabis production. The former director of the Peruvian National Drug Control Commission, Ricardo Soberon, said: "The possibility of removing the criminal element from the cannabis trade – a drug that is a lot less dangerous than others – is the answer to 50 years of repeating the same strategies with no results."

Last week, the US state of Colorado decriminalised the recreational use of cannabis and people in Washington state have also voted to legalise marijuana, although stores are not expected to open until later in the year. Shares in companies involved in cannabis soared after Colorado's move. One firm, MediSwipe Inc, had its stock jump by nearly 70 per cent on 2 January. The legal trade of cannabis in the US alone could be worth $10bn (£6bn) by 2018. And analysts say it is China that is once again at the forefront of exploiting new economic opportunities.

"Because cannabis in Western medicine is becoming accepted, the predominance of Chinese patents suggests that pharmaceutical sciences are evolving quickly in China, outpacing Western capabilities," Dr Luc Duchesne, an Ottawa-based businessman and biochemist, wrote in InvestorIntel. "CTM [Chinese traditional medicine] is poised to take advantage of a growing trend. The writing is on the wall: Westernised Chinese traditional medicine is coming to a dispensary near you."

Many of the Chinese patents are for herbal treatments. One, filed by the Yunan Industrial Cannabis Sativa Co, refers to an application made from whole cannabis sativa seeds to make "functional food" designed to improve the human immune system. Another, by an inventor called Zhang Hongqi, is for a "Chinese medicinal preparation" for treating peptic ulcers. It uses an array of ingredients, including cannabis sativa seed. The filing says it has "significant therapeutic effectiveness and does not cause any adverse effect".

There is also a patent filing from China for a treatment for constipation, which is made using fructus cannabis and other ingredients such as "immature bitter orange", Chinese angelica and balloon flower. This, it is claimed, treats constipation's root causes and symptoms resulting in "obvious curative effects".

However, only one company in the world has developed cannabis-based drugs as medicines that have been recognised by regulators in the West following the long, costly process of clinical trials. GW Pharmaceuticals, based in Wiltshire, makes Sativex for the treatment of symptoms of multiple sclerosis and cancer pain, and Epidiolex for childhood epilepsy.

A spokesman for the company, which is the only one licensed to carry out research on cannabis in the UK, said China had a long history of working with herbal medicines. "In that sense it doesn't come as a surprise. This is a country with thousands of years of working with plants in medicines," he said of the patent filings.

In December, Jamaica announced it was forming its first medical marijuana company, called MediCanja. Henry Lowe, a scientist and executive chairman of MediCanja, said medical cannabis could help "transform Jamaica's fledgling economy". He added: "Given Jamaica's history with ganja, we could be the hub for medical ganja in Latin America and the Caribbean."

Peter Reynolds, leader of Cannabis Law Reform (Clear), a UK-based campaign group, said China had another advantage over other countries in selling cannabis as it is one of the largest producers in the world of industrial hemp, a form of cannabis with a low amount of the psychoactive compound THC. "The Chinese are smarter and they are on to all the good ideas," Mr Reynolds said. "The potential for cannabis as a medicine is monumental."

But smoking cannabis remains illegal in China. In April last year, the South China Morning Post reported that it was a popular drug among the country's young people despite the threat of lengthy prison sentences.

Mr Reynolds said the UK possessed world-leading expertise on cannabinoids, and there was a "terrible, terrible irony" that the Government was so hostile to its use. "We're in a situation now where cannabis is available on prescription [in the UK], but it's almost impossible to get because it costs so much more," he said.

The opening up of a legal trade in non-medical marijuana is not without its critics. Uruguay's decision to remove all legal restrictions on use was condemned by the International Narcotics Control Board, the body charged with monitoring international treaties on narcotics. "Cannabis is not only addictive but may also affect some fundamental brain functions, IQ potential and academic and job performance, and impair driving skills," it said in a statement. "Smoking cannabis is more carcinogenic than smoking tobacco."