HELENA, Mont. — Montana’s attorney general has the authority to move the state Title and Registration Bureau from Deer Lodge to Helena, a judge ruled in a lawsuit filed by the City of Deer Lodge seeking to block the move.

The city of Deer Lodge and its council members argued the decision was made without taking public comment, in violation of the Montana Constitution.

District Judge Ray Dayton ruled last week that Attorney General Tim Fox had the authority to make the decision under state law, which allows him to manage the internal organizational structure of the Department of Justice and to promote its efficient operation.

“While the defendants’ decision to move the TRB office out of Deer Lodge is certainly lamentable from the community’s perspective — and a decision that might well have been handled differently — it was a decision that the attorney general had authority to make,” Dayton wrote.

Fox announced the decision in June, saying moving the 37 jobs to Helena and not renting the Deer Lodge facility that has more space than needed would save about $216,000 annually.

“We are pleased with the ruling,” DOJ spokesman John Barnes said Tuesday. The move will free up resources that can be used to improve customer service throughout the state, Barnes said.

The attorney for the city, Jeff Hindoien, did not immediately return a phone call seeking comment.