A Connecticut state worker fired after he was caught smoking marijuana on the job was punished too harshly and should get his job back, the state Supreme Court ruled Friday.

Gregory Linhoff was fired from his maintenance job at the University of Connecticut Health Center in Farmington in 2012 after a police officer caught him smoking pot in a state-owned vehicle. He had no previous disciplinary problems since being hired in 1998 and had received favorable job evaluations, according to his union. He was arrested, but the charges were later dismissed.

State officials said firing the New Hartford resident was the only appropriate penalty for his conduct and not doing so would send a bad message to other employees. An arbitrator disagreed and overturned the firing, saying Linhoff instead should be suspended without pay for six months and be subject to random drug testing for a year after he returned to work.

The state appealed and a Superior Court judge overturned the arbitrator's decision on the grounds that it violated Connecticut's public policy against marijuana use. Linhoff's union, the Connecticut Employees Union Independent SEIU, appealed the judge's ruling to the Supreme Court.

All seven justices agreed that the lower court judge was wrong to overturn the arbitrator's ruling, saying that while state policy on drug use in the work place allows for firing workers it does not require it. Justices also said that judicial second-guessing of arbitration awards is uncommon and should be reserved only for extraordinary circumstances.

"The misconduct at issue was completely unacceptable, and we do not condone it," Chief Justice Chase T. Rogers wrote in the decision.

"By the arbitrator's estimation, (Linhoff's) personal qualities and overall record indicate that he is a good candidate for a second chance," Rogers wrote. "Moreover, the discipline the arbitrator imposed was appropriately severe, and sends a message to others who might consider committing similar misconduct that painful consequences will result."

Linhoff couldn't be reached for comment Friday. A phone number for him could not be found.

His attorney, Barbara Collins, and officials with the state Attorney General's Office did not immediately return messages.

At the time Linhoff was fired, he was seeking treatment for depression, stress and anxiety because his wife had filed for divorce and he had a cancer scare; he believed smoking pot helped to alleviate his worries, Collins has said.

Collins wrote in court documents that Linhoff's conduct was not so egregious that he should be denied a second chance.