MONTPELIER — A split Vermont Supreme Court on Friday overturned the conviction of a man who’s already served his sentence, saying the trial judge used the incorrect legal definition of the word “harassment” in instructing the jury that found the man guilty of violating a relief-from-abuse order.

In a 3-2 decision, the high court said that under the relief order, Tyler Smith Waters was allowed some contact with his former girlfriend and that the 37 text messages he sent her over 30 days in 2009 did not threaten her with physical harm. The court said Vermont law defines harassment as involving a threat of violence.

“We recognize that defendant’s repeated texts to petitioner were insensitive,” said the majority decision written by Justice Beth Robinson. “But we cannot say that the communications amounted to threats.”

Dawn Matthews, a lawyer in the Vermont Prisoners’ Rights Office, said Waters served two years in prison after his 2011 conviction. She said she did not know where he is now or if he was aware of the court’s ruling.

The case, from Windham County, grew out of a charge that Waters violated the 2009 relief order requested by his former girlfriend, whom the high court did not identify. At the time, Waters had already been convicted of violating another relief order.

Under the 2009 order, he also was allowed weekly conversations with his child by the former girlfriend. But in December of that year, she told police she felt “harassed, bullied and made to feel guilty” after she received the flurry of text messages from him.

The case went to trial. And in instructing the jury, Judge David Suntag said that to harass a person “means to intentionally engage in a course of conduct directed at that person which would cause a reasonable person to be annoyed, irritated, tormented or alarmed.”

But the Supreme Court majority said in its ruling Friday that the only definition of harassment in state law is in the stalking statute, and that requires a threat of violence. The majority said the relief-from-abuse order should have prohibited Waters’ conduct in the case but did not.

The high court said the law can punish Waters only for violating the conditions imposed upon him, not for violating conditions that in hindsight should have been imposed on him.

A dissent written by Justice Brian Burgess said the lower court’s ruling was proper because Waters’ former girlfriend had told him more than once to stop texting her.

“It does not take a linguist, a lawyer, or statutes from other states to know that persistently texting your domestic-violence victim to get her within reach, after she has obtained a relief-from-abuse ... order against you and after being told your hectoring is unwelcome, is ‘harassment,”’ wrote Burgess, who was joined in the dissent by Chief Justice Paul Reiber.