SANTA FE, N.M. — New Mexico judges need to exercise caution when it comes to using social media, according to the state’s highest court.

In a ruling on a defendant’s retrial, the New Mexico Supreme Court ended up issuing guidelines for judges who utilizing Facebook and other online platforms.

The panel ordered a retrial last week for a defendant convicted in a 2010 killing of an Albuquerque woman.

The conviction was overturned because court testimony over a Skype video link was seen as depriving Truett Thomas of the right to confront a hostile witness. However, a celebratory Facebook post by the presiding judge also caught the court’s attention.

Shortly after Thomas’ conviction, Judge Samuel L. Winder wrote on a page for his election campaign that “Justice was served. Thank you for your prayers.” Thomas’ defense attorneys pointed to the comments as grounds for a new trial. Winder later lost his election and his successor denied the request.

Chief Justice Charles Daniels spent several pages of the 38-page decision on Thomas’ retrial discussing social media ethics and etiquette.

“Members of the judiciary must at all times remain conscious of their ethical obligations,” Daniels wrote.

The chief justice said judges should not post anything personal on election social media profiles. Instead, they should let their campaign committees handle them.

Daniels also urged prohibiting comments from the public on those accounts, limiting any dialogue. In addition, judges should implement privacy settings and carefully consider accepting “friend” requests.

Daniels cited a case in Florida where a lawyer argued he could not get a fair trial after not responding to the presiding judge’s friend request on Facebook.

Albuquerque attorney Emil Kiehne, who regularly blogs about legal issues, said keeping judges from being involved in campaign social media accounts denies personal engagement with voters. Facebook, Twitter and other outlets can have benefits, he said.

“It helps to humanize judges and lets people know judges are people like them and are not divorced from the rest of the population,” he said. “It’s a way for judges to connect with the people they serve.”

A state Supreme Court advisory committee on judicial conduct had previously given an advisory opinion on social media in February. That opinion only mentioned that judges use discretion on social media. But it stated judges should not use pseudonyms, endorse candidates or post reviews on sites such as Yelp.

Greg Hurley, an analyst at the National Center for State Courts, said courts can address issues of keeping up with changing technology by training judges.

“For the younger generation, Facebook is passe,” Hurley said. “But for the legal community, it’s still new.”