A New Jersey appeals court on Thursday upheld the state’s medical marijuana law, along with the Department of Health’s determination that only nonprofit entities may qualify as cultivators and dispensaries.

The Appellate Division turned away a challenge by Natural Medical Inc., a for-profit company that argued the department’s restrictions on “alternate treatment centers” (ATCs) were onerous and beyond statutory authority.