BOSTON — Massachusetts corrections officials say a transgender inmate should remain at a men’s prison because transfer to a women’s prison may cause problems.

The transgender woman has filed a federal lawsuit seeking a transfer. It says she was told she could be sent to a women’s prison only if she had gender reassignment surgery.

At a hearing Wednesday, prison officials said they have made reasonable accommodations for her at the men’s prison in Norfolk, including hormone therapy, mental health counseling, an individual cell and a separate shower.

The Boston Globe reports that the woman submitted a statement saying she is in “constant fear” of being raped or harassed.

The inmate lived as a woman for decades before being imprisoned. She is serving a three- to four-year sentence for a nonviolent drug offense.