JACKSON, Miss. (AP) — Mississippi is legalizing medical marijuana for people with debilitating conditions such as cancer, AIDS and sickle cell disease.

Republican Gov. Tate Reeves signed the legislation Wednesday and it became law immediately. It could be months before the first marijuana dispensaries open.

The National Conference of State Legislatures says 36 states and four territories already allowed the medical use of cannabis. Mississippi becomes the 37th state.

“For all the people who are touched in some way by a loved one or someone they know who benefits from medical cannabis, this brings their quality of life back,” said Ken Newburger, executive director the Mississippi Medical Marijuana Association, a group that pushed for legalization.

A majority of Mississippi voters approved a medical marijuana initiative in November 2020, and it would have allowed people to buy up to 5 ounces a month. The state Supreme Court invalidated it six months later by ruling that the state’s initiative process was outdated and the measure was not put properly on the ballot.

The state House and Senate, both controlled by Republicans, passed the final version of Senate Bill 2095 last week.

The legislation says patients could buy up to to 3.5 grams of cannabis per day, up to six days a week. That is about 3 ounces per month. It also sets taxes on production and sale of cannabis, and it specifies that plants must be grown indoors under controlled conditions.