The union representing about 4,000 Massachusetts corrections officers sought to block an upcoming vaccine mandate deadline for state workers in federal court Thursday, saying that their constitutional and contract rights are being violated.

Officers who don’t get the COVID-19 vaccine by Sunday, Oct. 17, could face punishment or termination from their jobs under Gov. Charlie Baker’s August executive order.

Baker activated the National Guard Tuesday to fill in for corrections officers if staffing falls short after the vaccine deadline goes into place. Less than half of correction officers are vaccinated, according to an Oct. 6 letter from the union, but the union’s attorney claimed Thursday the figure is roughly 75 to 80%. The Department of Correction did not reply to a request for clarification.

U.S. District Court Judge Timothy Hillman said he would take arguments “under advisement” ahead of the Sunday deadline, and didn’t issue a decision.

The prison guards aren’t the only state employees incensed about the mandate. The state troopers association filed a lawsuit in state court last month claiming the mandate was primarily a bargaining issue but failed to get an injunction, with the judge ruling that bargaining rights over working conditions did not outweigh the public interest of getting people vaccinated.

The correctional officer claims against Baker and Department of Correction Commissioner Carol Mici, though, are much broader. The plaintiffs argued the Constitution’s Fourteenth Amendment forbids the government from infringing upon “fundamental liberty interests, no matter what process is provided, unless the infringement is narrowly tailored to serve a compelling state interest.” They argue the amendment extends to refusing unwanted medical treatment, including vaccines, even if it’s life-saving.

“We believe, obviously, that an order which effectively names a new condition of employment, which names a behavior which is per se a just cause for termination,” attorney James Lamond, representing the Massachusetts Correction Officers Federated Union, said on Thursday. “Our view is that that does bring about a substantial change in the rights and responsibilities that the parties have themselves worked out over time.”

Plaintiffs Michael Mosher, Zac Gustafson, Denina Dunn and Angela Pucci said in their complaint that the state doesn’t have just cause to fire them because the vaccine isn’t part of the collective bargaining agreement as a condition for employment.

Hillman pushed back on the idea that the government has the same obligations as a typical employer, saying that its obligation is to the public at large.

“We’re talking about governmental employees. I mean that’s a big, big difference,” he said.

Jenn Greaney, the attorney for the Baker administration, argued that the state simply has to prove the decision for the mandate was reasonably related to a legitimate public interest, or keeping the public’s health safe.

“The state has to be able to exercise those police powers, even though the exercise of those powers might have an impact on existing contract,” she added, pointing to other recent local and national cases that have allowed vaccine mandates to move forward.

Greaney also said no harm had been shown to the four corrections officers in the suit that would warrant a preliminary injunction.

Both attorneys pointed to a 1905 court case in the city of Cambridge for evidence, when compulsory smallpox vaccination was under debate after the city of Cambridge mandated it. In that instance, the court upheld the state’s power to charge a fee for anyone who refused to get a vaccine against the smallpox in Boston, but didn’t strip anyone of employment.

The union also said in their Oct. 6 letter that the National Guard, who are lined up to fill in for officers in the event of a staffing shortage, doesn’t have a vaccine mandate.