ALBANY, N.Y. — Two Muslim correctional officers in New York were reinstated Tuesday after being suspended for refusing to shave their beards because of religious reasons, the state prisons agency said.

It came a day after Brian Sughrim and David Feliciano, correctional officers at Fishkill prison in Dutchess County, filed a federal lawsuit against the Department of Corrections and Community Supervision.

The lawsuit, which argued the agency discriminated against the two men, is the “sole reason that they’re getting their jobs back,” said their attorney, Joshua Moskovitz.

The agency did not comment on what role the lawsuit might have played in the officers’ reinstatement.

It seems clear, Moskovitz said, that religious intolerance was at the heart of the suspensions. The litigation will proceed, he said.