New Jersey's top court said Tuesday that medical marijuana patients can't be fired just for failing a drug test, handing a win to patients across the state, including one man who says he was sacked from his job at a Ridgewood funeral home for using medical marijuana while off the clock.

The New Jersey Supreme Court ruling sends a message to employers across the state that they cannot fire employees simply for the use of medical marijuana while off duty, and that doing so can be challenged in court. The case started in Bergen County and the Tuesday ruling further defines protections for more than 70,000 medical marijuana patients across the state.

“The big takeaway here is employers must reasonably accommodate individuals who are legal users of marijuana in the state of New Jersey, just as they would have to reasonably accommodate an employee taking any prescription medication," said Maxine Neuhauser, an employment lawyer at Epstein Becker Green in Newark and who has been following the case. "If the individual’s ability to perform the job is not impacted by their use of medical marijuana, then you can’t just fire them for a positive drug test."

NJ legal weed: What we know after lawmakers kill the bill, say voters should decide

Justin Wild had worked as a funeral director at Feeney Funeral Home in Ridgewood for two years when he was diagnosed with cancer, according to prior court filings. A doctor prescribed him medical marijuana, which can help ease pain, in 2015 under what was then called the Compassionate Use Medical Marijuana Act.

A year later, in 2016, Wild was involved in a car crash while on duty. Wild's boss required him to take a drug test before returning to work, according to court records.

About a month later Wild got a letter from the mortuary's corporate owner notifying him he was fired "not because of his drug use, but because he failed to disclose his use of medication which might adversely affect his ability to perform his job duties," an appeals court decision reads. But Wild's boss had also told him he was “being terminated because they found drugs" in his system, according to court records.

MORE: NJ legal weed bill will force towns that passed local bans to do it all over again

Wild filed a lawsuit, saying in part that his termination violated New Jersey's Law Against Discrimination, which protects employees with disabilities from discrimination and firing.

A Superior Court judge dismissed his claims and sided with the funeral home, which argued that it was not aware of Wild's disability. In March, an appeals court revived the case, saying Wild's claims under the anti-discrimination law should proceed. The state Supreme Court on Tuesday affirmed the appeals court's ruling.

The decision was "a great steppingstone to providing employees with rights, frankly, that they already had under the (Law Against Discrimination), and now it's simply confirmed," said Jamison Mark, Wild's lawyer. "The trial courts now can’t just rubber stamp a dismissal based on failed drug test."

Wild can now continue pursuing his discrimination lawsuit against the funeral home in Bergen County Superior Court.

The attorneys for Feeney Funeral Home, and the mortuary's corporate owner, Houston-based Carriage Funeral Holdings, did not respond to phone messages seeking comment.

The New Jersey Attorney General's Office joined in the case arguing medical marijuana patients were protected from punishment on the job by anti-discrimination laws. The decision means "New Jersey’s Law Against Discrimination allows employees with disabilities to sue for discrimination if their employers refuse to reasonably accommodate their need for lawful medical treatment, including medical marijuana in certain circumstances," a statement from the office says.

In recent years courts in several other states, including Connecticut, Massachusetts and Rhode Island, have weighed in on similar cases, giving participants in medical marijuana programs protections and saying employers must accommodate their legal use of marijuana.

New Jersey first enacted its law allowing patients to obtain medical marijuana in 2010. It was the 14th state to do so. Last year, the law was revamped and expanded under the Jake Honig Compassionate Use Medical Cannabis Act. The law's namesake, Jake, was a 7-year-old Howell boy who died of brain cancer. Jake's parents launched a campaign to expand the state's medical marijuana program.

Changes to the program last year also added language explicitly preventing someone from being fired just based on their participation in the medical marijuana program and set rules for employers to follow when someone fails a drug test. The Supreme Court ruling ensures people who entered the medical marijuana program before those changes and who may have been punished at work are able to file lawsuits, according to Mark.

READ MORE:Howell mourns 7-year-old Jake "The Tank" Honig

There are more than 71,000 patients, 2,700 caregivers and 1,100 doctors participating in the program, according to the New Jersey Department of Health. The program has existed in the state for a decade, but its growth hasn't been without troubles. The first dispensary didn’t open until 2012, two years after the law was passed.

And while the number of patients has tripled since Gov. Phil Murphy took office in early 2018, the number of dispensaries hasn’t kept up with demand. There are just seven alternative treatment centers — the official name for dispensaries — in the state, according to the state health department.

Recent efforts to license new places to buy medical marijuana have been held up by court battles and the shortage, advocates say, is driving up prices. The health department said in its most recent report that many patients were paying more for marijuana when buying it legally than when buying on the black market. Some dispensaries have been allowed to open satellite locations in the hopes of addressing demand.

The program has expanded during Murphy's tenure, but the governor's pledges to legalize recreational marijuana for adults have fallen short. After nearly two years of back-and-forth in the Legislature, lawmakers ultimately opted to ask voters whether to legalize.

Voters will decide at the polls in November.

Email: sbarchenger@gannettnj.com Twitter: @sbarchenger