BANGKOK — The use of marijuana for medical purposes became officially legal late Monday through a royal decree.

The law was signed by His Majesty the King two months after it was unanimously approved by the parliament. It legalizes the medical use and research of not only cannabis but also kratom.

Those eligible for marijuana possession or cultivation are patients with prescriptions, drug or health related government agencies, certified medical professionals, educational institutions, agricultural community enterprises registered with the state and international transportation operators.

Cultivation, however, must be approved and operated under the direct supervision of the Narcotics Control Board.

As proposed by the Food and Drug Administration, individuals and organizations that already possess marijuana should notify regulators within 90 days to be legally pardoned.