Thailand became the first Southeast Asian country to legalize cannabis for medical use on Tuesday. The Thai National Assembly unanimously passed the measure after amendments were first brought to the Health Ministry in November.

The new legislation makes it legal to produce, import, export, and possess cannabis for medicinal purposes. Patients with a qualifying condition must receive a medical card from a doctor, and doctors must be licensed by the state, much like in the US.

First outlawed in the 1930s, this marks a change in a country known for strict drug laws. Cannabis is still illegal for recreational use in Thailand, and possession of up to 22 lbs of “kancha”—as it’s called in Thailand—without a medical card can get you up to five years in prison and a stiff fine.

Some lawmakers look at this new legislation as a first step on the road to recreational cannabis legalization for the country.

Along with huge public support, concern over foreign interference helped push along the legislation. Several patent applications from foreign companies are pending with the Thai government, which would make it difficult for Thai researchers to have access to the plant for study, and would also block Thai companies from producing the plant and make it harder for Thai patients to receive medical cannabis. The new legislation promises to block these foreign patent applications.

Cannabis is still illegal in many of Thailand’s neighbors, such as Singapore, Indonesia, the Philippines, and Malaysia. Currently, all of these countries impose prison sentences for possessing small amount of cannabis and the death penalty for trafficking large amounts of the plant.

Thailand’s new legislation could positively affect the rest of the region. Currently, Malaysia is considering legalizing cannabis for medical use.