Colombian President Juan Manuel Santos signed a decree Tuesday legalizing and regulating medical marijuana, the latest softening of the country’s hardline tactics in the war on drugs.

In a nationally televised address, Santos announced it would be fully legal to grow, process, import and export cannabis and its derivatives for medical and scientific use.

“This decree allows licenses to be granted for the possession of seeds, cannabis plants and marijuana,” he said from the presidential palace.

“It places Colombia in the group of countries that are at the forefront… in the use of natural resources to fight disease.”

Colombia’s government has long been a close ally of the United States in fighting international drug trafficking, using its military and billions of dollars in US funding to try to shed its title as the world’s largest cocaine producer.

But it has shown signs of easing its hardline stance in recent months.

Santos’s announcement follows a recent decision to stop aerially spraying the herbicide glyphosate on fields of coca, the raw ingredient for cocaine.

The World Health Organization warned in April that the chemical, sold by US biotech company Monsanto under the brand name Roundup, is “probably carcinogenic.”

Santos also announced in September that Colombia would begin giving land to farmers who stop growing coca.

Medical marijuana had previously fallen into a legal gray area in Colombia.

“The manufacture, export, sale, and medical and scientific use of this and other substances have been permitted for several decades in Colombia. However, they were never regulated. That is what we are doing today,” Santos said.

Under the decree, growers will apply for licenses from the National Narcotics Council, while those seeking to manufacture cannabis-based drugs will apply for permits from the health ministry.

The health ministry will also grant permits to export such drugs to countries where they are legal.

“Our goal is for patients to be able to access medications made in Colombia that are safe, high-quality and accessible. It is also an opportunity to promote scientific research in our country,” Santos said.

– ‘Plan Colombia’ –

The push to legalize marijuana appears to be gaining momentum in Latin America, for both medical and recreational use.

Uruguay legalized the production, sale and use of marijuana in 2013, Chile’s Congress is debating a bill to legalize pot, and Mexico will open a “national debate” in January on overhauling its prohibitionist marijuana laws.

Colombia decriminalized possession of up to 20 grams of marijuana in 2012, and it is legal to grow up to 20 cannabis plants in the country. But consuming it in public and selling it are illegal.

Medical marijuana is already used in Colombia on a small scale.

For example, some epileptics use cannabis extract to control their seizures.

But health professionals and pharmaceutical companies say the new decree will make it much easier to buy, sell and manufacture such drugs.

Illegal drugs have given rise to horrific violence by drug cartels in Colombia, and have fueled a five-decade conflict between leftist guerrillas and the Colombian government that has killed more than 220,000 people.

The country has received $9 billion in US funding since 1999 under “Plan Colombia,” a military and economic cooperation program aimed at combating drug trafficking.

But it remains a top producer of illegal drugs, particularly cocaine.

Colombia’s cocaine production surged by 52 percent last year, to 442 tons, according to the United Nations.