(Updated 9:12 p.m.) A judge struck down an effort by the state troopers union to block layoffs—and then the union president found himself sent back to patrol.

Wednesday afternoon Sgt. Andrew Matthews, president of the Connecticut State Police Union, filed a temporary injunction in Hartford Superior Court to stop the state from laying off 56 troopers.

Unable to prove irreparable harm, Judge James Graham denied the police union’s application for a temporary injunction to stop the layoffs.

While the eleventh hour attempt to save the jobs didn’t work, Matthews said the union plans to proceed with a complaint against the state for not complying with the state statute recommending a staffing level of 1,248 troopers.

A hearing on the merits of the issue will be held Sept. 15.

“We are confident that all actions taken with respect to state police staffing levels are fully consistent with the law, and will continue to provide protection to both the people of our state and the troopers who serve them,” Andrew McDonald, Malloy’s legal counsel, said. “We believe the court reached the right decision when it denied the temporary injunction today, and we look forward to the hearing on September 15th when the state’s motion to dismiss this case will be heard.”

The layoffs bring the total number of troopers down to 1,064, well below the 1,248 cited in state statute.

Matthews said Wednesday night that he owes it to the members of the union and the public to continue fighting for the positions to be restored. He said he expects the number of retirements to increase as Oct. 1 approaches and it could only be a matter of time for the state to dip below 1,000 troopers.

“I don’t know how this is going to play out,” Matthews said.

Earlier in the afternoon, Public Safety Commissioner Reuben Bradford said 34 of the state troopers were notified today that their layoff notices will be effective immediately. The remaining 22 troopers will stay on until Sept. 8, so older troopers in specialized units have to time to take a patrol refresher class. Most of the positions will be filled by troopers from administrative and training staff—areas they say won’t impact public safety.

“Most of them are positions we don’t normally see out on the highway,” Col. Danny Stebbins said.

Asked why the state has failed to maintain the statutorily mandated 1,248 troopers Stebbins said, “like anything it comes down to a funding issue.”

”I also don’t think that’s a mandate,“ Bradford said. However, he was quick to add, “we both would enjoy working with more rather than less.”

Sen. Minority Leader John McKinney alleged that Malloy’s decision to go through with the 56 trooper layoffs after the union rejected the two year wage-freeze and four years of job security, was “rooted in political retribution, rather than sound public policy.”

“Clearly we need to cut state spending,“ McKinney said in a statement. “But, clearly, there are other areas within Gov. Malloy’s $40 billion two-year budget where cuts could have been made without compromising public safety, or wasting prior state investments.”

But not all Republicans agree.

“What’s the guy supposed to do? I don’t disagree with the governor’s decision and I certainly wish it wasn’t this way,” House Minority Leader Lawrence Cafero, R-Norwalk, said in the Capitol atrium. “They knew the consequences.”

At a ceremonial groundbreaking Wednesday morning, Malloy said he hadn’t heard claims that he issued the layoffs to punish the police for refusing to accept the two year wage freeze.

“I think it’s just the reality of what happened,“ he said. “Overwhelmingly state employees, probably 98 percent of them, accepted the concession package. Everyone knew what the stakes were and now we move forward.”

Prior to heading to court, Matthews was at the state Capitol talking to the media about how he was being transferred from a Troop C in Tolland to Troop H in Hartford and put back on patrol. He alleged the move was retaliation for doing his job and speaking out against the layoff of 56 state troopers with a rally at the Capitol on Monday.

“I’m a little hesitant to talk to the press at this time,” Matthews said Wednesday afternoon. “But I’m going to do so.”

“One can only suspect that because of the rally that was held two days ago … I believe it’s an attempt to silence the union and our members,” Matthews, who is an attorney, said. “It’s a shot across the bow in our view to try to chill our speech.”

Asked if it was retaliation, Roy Occhiogrosso, Gov. Dannel P. Malloy’s senior communications adviser, said “it’s ridiculous to even suggest that.” He said six other sergeants were transferred back to patrol.

“Slots have to be filled. It’s my understanding that Sgt. Matthews lives in Enfield and has been transferred to Hartford. I don’t see how anyone could interpret that as being retaliatory,” Occhigrosso added.

Matthews said he’s hardly filling a slot if most of his time is being spent doing union business, per his contract with the state. Matthews estimated he’d be on patrol one day a month; and he opined that one day a month isn’t going to help control overtime costs.

But Matthews said he wasn’t at the Capitol to talk about his own situation. He said the union will be filing a lawsuit against the state for laying off 56 troopers.

Hugh McQuaid contributed to this report.