Even as 11 states, plus Washington, D.C., have legalized recreational cannabis, lawmakers have struggled to find consensus on the question of whether employers could reject an applicant over their pot use. Now Nevada has become the first to push through that protection.

Nevada Gov. Steve Sisolak signed Assembly Bill 132 making it illegal for employers to rebuff job applicants based on the results of a marijuana test. The law will go into effect on Jan. 1, 2020.

The law, however, will not apply to people up for jobs as firefighters and public safety positions, including emergency medical technicians, according to the legislation.

When the Nevada Trucking Association objected to the proposal, the legislation was rewritten to allow pre-hiring testing for operators of motor vehicles or other positions that “in the determination of the employer, could adversely affect the safety of others," according to the law.

"As our legal cannabis industry continues to flourish, it’s important to ensure that the door of economic opportunity remains open for all Nevadans. That’s why I was proud to sign AB 132 into law, which contains common-sense exceptions for public safety and transportation professionals," Sisolak, a Democrat elected governor in November 2018, said in a statement.

Sisolak signed the legislation on June 5.

Nevadans voted in 2016 to make adult recreational use of cannabis legal in the state. The law went into effect on Jan. 1, 2017.

Nevada Assemblywoman Nina Neal, D-Las Vegas, said that despite the popularity of legal weed in the state, there had been no policy in place until now to prevent employers from discriminating against legal pot users.

Neal said she opposed the ballot initiative legalizing recreational marijuana in Nevada, but once it passed she said it quickly became clear that a new policy had to be developed for employers.

"I was driving around my district and I realized that the [legal weed] dispensaries were like nightclubs and I was worried, and I was just like, 'This is going to have a negative effect,'" Neal told ABC News on Wednesday.

She said that when she proposed the legislation in February, tax revenue from the first year of legal marijuana sales topped $42 million.

"I felt like we needed to have a policy to deal with it because we had a significant amount of people using on the weekends," Neal said.

Because pre-employment urine tests can detect marijuana in a user's system for several weeks after consuming weed, Neal said she was concerned that her constituents would miss out on employment opportunities.

"I hope that employers actually try to not discriminate against recreational users because once we made it lawful through the ballot, the ballot question said it needed to be treated the same as alcohol," Neal said.

Other states where marijuana is legal have struggled to forge similar policy for pre-employment testing for weed.

In Maine, where voters approved legal recreational cannabis in 2016, employers are prohibited from discriminating against people who have used pot, but there is still no specific policy to regulate drug testing.

While New York is among the states that have yet to legalized marijuana, the New York York City Council approved a city law last month to prohibit employers from pre-hiring weed testing.

“It’s clear that we cannot wait until legalization on the state level before moving to reduce the impact that marijuana prohibition has had on individuals and communities,” New York City Public Advocate Jumaane Williams said in a statement.

“Testing isn’t a deterrent to using marijuana, it’s an impediment to opportunity that dates back to the Reagan era -- a war on drugs measure that’s now a war on workers," Williams added. "We need to be creating more access points for employment, not less -- and if prospective employers aren’t testing for past alcohol usage, marijuana should be no different.”