“That is another way of how the Iowa Civil Rights Act has been pulled into a case specifically in the state of Iowa,” Daniel Hoffman-Zinnel, the executive director of One Iowa, an advocacy group for L.G.B.T. rights, said in an interview on Thursday.

“It takes time for culture to catch up to policy,” he said. “The time is now for things to happen.”

A Department of Corrections spokesman, Cord Overton, said on Thursday: “The department is working with the Office of the Attorney General to review the court’s decisions, and we are evaluating our options going forward.”

He did not immediately respond to emailed questions on Thursday about possible changes to policy. The other defendants named in the lawsuit, Patti Wachtendorf, a prison warden, and the Department of Administrative Services, could not be reached for comment.

Mr. Vroegh’s lawsuit described a lifetime of gender identity milestones. Assigned the female gender at birth, he knew he was male since he was 7 years old, the lawsuit said. In the third grade, he started using the name Jessie, which sounded like a “traditionally male name,” it said. Mr. Vroegh said in the interview that he derived the name from the one he was given at birth.

In 2000, he presented as male in the way he dressed and cut his hair, the lawsuit said.

Mr. Vroegh started working for the Correctional Institute for Women, a prison in Mitchellville, Iowa, in 2009 as a registered nurse, which he described in the interview as a fulfilling job. “I loved working with the ladies who I took care of in the prison,” he said.

He also had supportive colleagues, some of whom attended his wedding to his wife, Jackie Vroegh, in 2010, he said.

In 2014, Mr. Vroegh received a diagnosis of gender dysphoria, was given medical treatment and was advised to socially transition to living full-time as a male in “every aspect of his life,” the lawsuit said. He started using hormone therapy, asked others to use male pronouns when speaking to or about him, and started to use public restrooms for men, according to the lawsuit.