DENVER (KDVR) — Starting Aug. 7, people who are under the age of 21 will not be able to buy any firearms in the state of Colorado.

This new law was signed in April and makes purchasing a gun when you’re under 21 years old punishable by up to one year in jail or a $1,000 fine. Anyone who sells or transfers a firearm to someone under 21 could be punished with up to 18 months in jail or a $5,000 fine. There is an exception active duty military and peace officers.

Federal law already restricts anyone under 21 from buying handguns, but a Virginia federal judge ruled that law unconstitutional in May.

Colorado’s new law also faces legal challenges. The Rocky Mountain Gun Owners Group is suing Gov. Jared Polis’ administration over the law and filed a temporary restraining order over it on Aug. 4.

Whether or not the law stands, Colorado is one of 22 states with a law that bars gun sales to people under 21.

These include California, Colorado, Connecticut, Delaware, Florida, Hawaii, Illinois, Iowa, Maryland, Massachusetts, Nebraska, Nevada, New Jersey, New Mexico, New York, Ohio, Oregon, Pennsylvania, Rhode Island, Vermont, Virginia and Washington.