TRENTON -- An Ocean City firefighter who may lose his job for being a registered medical marijuana patient cannot proceed with a lawsuit against the city until he undergoes a departmental hearing, a state judge has ruled.

If the case makes its way to court, it would likely to be the first of its kind in the state involving the legality of a public safety employee's use of medical marijuana. Another case, involving an NJ Transit employee who used medical marijuana, is pending.

Veteran firefighter Donald Brad Wiltshire sued Ocean City in February for discrimination and violating the whistleblower act after he disclosed he uses cannabis to manage a rare and painful muscular condition.

The city suspended him in October with the intent to fire him for violating the fire department's drug testing policy, according to the lawsuit.

Last month, state Superior Court Judge J. Christopher Gibson, sitting in Cape May County, ruled that Wiltshire first must "exhaust the administrative process" by participating in a disciplinary hearing before he can sue.

The Atlantic City Press was the first to report the June 9 court decision, on Wednesday.

It will be up to Ocean City "to establish that the lawful use of medical marijuana has impaired the plaintiff's ability to perform his job responsibilities as a firefighter," according to the judge's decision.

"The defendant's determination of impairment is based on mere suspicion and not supported by any expert or medical testimony," according to the decision.

Wiltshire is serving his suspension on paid medical leave, according to court documents filed by Ocean City response to the suit.

Ocean City's issues with the firefighter are broader than just his marijuana use, according to the brief the city filed in response to his lawsuit He also admitted to Fire Chief Christopher Breunig in October that he had taken the anti-seizure drug Klonopin for two years but stopped because it made him "drowsy."

"His failure to disclose his use of both these prescribed drugs violated city policy and departmental rules and regulations," Ocean City Attorney Dorothy McCrosson's brief said. "That is not disputed, and that alone is sufficient reason for the city to move forward with disciplinary proceedings."

Wiltshire's use of medical marijuana may be legal in New Jersey, but the law "does not bestow upon him a statutory right to continue to serve as a firefighter while he is using it," McCrosson wrote.

Wiltshire, a firefighter since 1995, enrolled in the state-regulated marijuana program in 2013 to help treat Dystonia a painful illness affects eye, facial and jaw muscles and can be debilitating if not treated.

Wiltshire's attorney, Louis Barbone of Atlantic City, could not be reached for comment.

Ocean City's public information officer Doug Bergen declined to comment because the case involves a personnel matter under litigation.

Wiltshire has the support of the Drug Policy Alliance of New Jersey, a lobbying and research organization that helped pass the medicinal marijuana law in New Jersey six years ago.

"New Jersey has long honored its local first responders who make our communities safe. Brad Wiltshire is one of these heroes, with a spotless 20-year record of courage and service," said Roseanne Scotti, the group's executive director, noting his numerous commendations, including some for responding to the attack on the World Trade Center. "No individual and no family should be punished for following their doctor's order and the laws of their state."

Susan K. Livio may be reached at slivio@njadvancemedia.com. Follow her on Twitter @SusanKLivio. Find NJ.com Politics on Facebook.