Illinois Gov. J.B. Pritzker signed a bill into action Tuesday that legalizes recreational marijuana in the state.

The law takes effect on Jan. 1, 2020. It allows adults to legally buy and posses recreational marijuana if they are at least 21 years old.

Legally, Illinois adults can purchase and possess up to 1 ounce (30 grams) of usable marijuana at a time. Nonresidents could have 15 grams.

Growers can have up to five privately home-grown plants for personal use, but only for patients approved for the existing medical marijuana program.

Last month, Illinois became the first state in the nation to approve a measure for marijuana legalization via a legislative body, rather than a referendum.

Lawmakers say the legalization of weed wouldn't come without restrictions. The bill specifies that cannabis products may not be transported over state lines.

Local towns can individually decide how cannabis-related businesses may fit into their communities. Employers, landlords and business owners are still allowed to maintain zero tolerance workplaces.

Illinois becomes the 11th state in the nation to legalize marijuana use.