Pennsylvania just became the 24th U.S. state to legalize medical marijuana.

Governor Tom Wolf approved the measure Sunday, allowing the sale and consumption of cannabis for treating specific diseases or symptoms.

Wolf, a Democrat, said in a statement that the measure "will improve the quality of life for patients and their families throughout Pennsylvania" by giving them access to a new treatment option.

The state will roll out its medical marijuana program over the next 18 to 24 months.

Related: Your medical marijuana questions answered

We did it! Medical marijuana is now legal in Pennsylvania. #MMJ pic.twitter.com/NgLf0DQRMU — Governor Tom Wolf (@GovernorTomWolf) April 17, 2016

Under the new law, up to 150 dispensaries can obtain an authorization to sell weed to patients with a doctor's certification.

According to a fiscal impact report, Pennsylvania estimates application and registration fees will net $10 million within a year.

The state will collect a 5% tax on medical marijuana purchases.

Related: Cannabis: Israel's next big medical export?

Among the diseases included in the statute's definition of "serious medical condition": Cancer, HIV/AIDS, Parkinson's disease, multiple sclerosis, spinal cord damage, epilepsy, inflammatory bowel disease, glaucoma and PTSD.

Voters in Alaska, Colorado, Oregon, Washington state and D.C. have legalized the sale of marijuana for recreational use, and 20 states and D.C. have decriminalized possession of small amounts of marijuana, according to the National Conference of State Legislatures. However, it's still a banned substance under federal law.