RIONEGRO, Colombia — Like many drug barons in Colombia, Federico Cock-Correa wants to sell his product globally. Just 15 miles outside Medellín, Mr. Cock-Correa is looking to replace vast acres of flowers with marijuana plants, with plans to export the harvest.

But unlike the brutal heroin and cocaine trade that once flourished nearby, his operation has the government’s stamp of approval.

Last year, President Juan Manuel Santos spearheaded an overhaul of Colombia’s 30-year-old drug laws, which formally legalized medical marijuana for domestic use. Crucially, the new law also allowed the commercial cultivation, processing and export of medical marijuana products — like oils and creams — although not the flower, the part of the plant normally rolled into a joint.

Officials hope the move will put a dent in Colombia’s drug trafficking business by creating a legal opportunity in an industry historically controlled by the black market. The authorities believe the new law will also help attract investment and give the economy a lift, though it will take several years before the returns on the investments become clear.