Massachusetts Gov. Charlie Baker on Tuesday announced plans to deploy up to 250 National Guard members to state prisons to meet potential staffing shortages caused by resistance to new vaccination regulations.

State officials say guardsmen will begin training this week to help the Department of Correction, if needed, with transportation and other functions outside the prison walls.

The move follows resistance from corrections officers to a state mandate that executive department workers prove they have been vaccinated against the COVID-19 virus by Oct. 17 or face possible termination.

Last month, the Massachusetts Correction Officers Federated Union filed a federal lawsuit opposing the requirement, citing their “constitutional right to decline this medical treatment.” There is a hearing scheduled in the federal case on Thursday. Union officials couldn’t be immediately reached for comment.

DOC Commissioner Carol Mici welcomed the governor’s announcement in a written statement. “We are grateful for the Guard’s assistance in supporting the DOC’s mission as we continue to encourage our staff to comply with the vaccination mandate,” she said.

DOC officials did not respond to requests Tuesday about how many DOC workers currently are vaccinated. There are about 6,300 prisoners in the state prison system that oversees 15 institutions.

The DOC also is considering bringing back retired corrections workers if necessary, state officials said, and staff who currently work outside the prisons may be sent into facilities to fill needed roles. The guardsmen will not have direct contact with prisoners unless they are accompanied by prison staff, state officials say.

“The availability of support from the National Guard will safeguard DOC operational continuity and continuing access to services and programming for inmates,’’ state officials said.

James Pingeon, litigation director for the nonprofit Prisoners Legal Services, said he hopes the deployment won’t be needed and urged corrections officers to get vaccinated for the good of public health. He worries about prison conditions with staffing shortages.

"The prisoners won't be able to go to programs, they won't be able to do rehabilitative activities,’’ he said. “The place will be shut down in a way that is destructive to the whole purpose of corrections.”