BANGKOK — In a move that has pot connoisseurs worldwide stocking up on Doritos, Thailand’s king this week has signed a royal decree legalizing marijuana and kratom for medical uses, allowing doctors, patients, schools, farmers, entrepreneurs and exporters to cultivate, possess and dispense both drugs.

Like Cuba and its cigars and France and its wines, Thailand is renowned for the quality and potency of its local weed. The move has raised hopes among many that the royal decree clears the way for legalizing recreational marijuana smoking and production soon.

King Maha Vajiralongkorn signed the medical measure two months after the military government’s parliament unanimously approved it, a legislative sequence required by the constitution.

Patients with prescriptions can now receive medical marijuana and kratom, an evergreen tree whose leaves are said to have health and stimulative benefits. Farmers need a Narcotics Control Board permit.

Recreational use of both drugs is still illegal.

Most of Thailand’s medical marijuana and kratom is initially expected to be imported from the U.S., Canada, Israel and other nations that have professional health standards for drug manufacturing, but the mere whisper of a rumor that fabled Thai pot varieties such as Northern Lights — praised by one marijuana site for its “resinous buds, fast flowering, and resilience during growth” — could soon be hitting the world market has created quite a buzz.

“It’s like the Wild West right now,” Kitty Chopaka from the Thai cannabis advocacy group Highland