(CNN) Starting in 2020, Nevada employers cannot refuse to hire a job applicant for failing a marijuana screening test, making it the first state to pass such a law.

"It is unlawful for any employer in this State to fail or refuse to hire a prospective employee because the prospective employee submitted to a screening test and the results of the screening test indicate the presence of marijuana," states the law, signed by Gov. Steve Sisolak on June 5.

There are some exceptions. The law does not apply to firefighters, EMTs, employees who operate a motor vehicle, or those who, in the determination of the employer, could adversely affect others' safety.

If an employer requires a new hire to take a screening test, then the new employee has the right to submit to an additional screening test to rebut the results, the law states. The employer must accept that follow-up test, the law says.

"As our legal cannabis industry continues to flourish, it's important to ensure that the door of economic opportunity remains open for all Nevadans," Gov. Sisolak said. "That's why I was proud to sign AB132 into law, which contains common-sense exceptions for public safety and transportation professionals."

The law takes effect at the start of 2020.

Nevada is the first state to approve such a law regarding drug screening tests. In 2016, voters in the state approved the legal sale of recreational marijuana to adults 21 and older, and recreational marijuana sales began a year later.

The New York City Council passed a similar bill in April that banned employers from requiring a prospective employee to pass a marijuana screening test as a condition of employment. In Maine, which legalized recreational marijuana, employers are not allowed to discriminate based on marijuana usage, but there are no laws about drug testing.