The US government is opposing imprisoned whistleblower Chelsea Manning's request to grow her hair long.
The transgender former Army intelligence officer made the request as part of a lawsuit in a court in Washington.
Gender-appropriate grooming is part of the recognised treatment for gender dysphoria, Ms Manning's sense of being a woman in a man's body, the lawsuit says.
The Kansas military prison where she is being held began giving her hormone therapy in February, but officials have refused to allow her to wear her hair longer than two inches (five centimetres).
In court papers filed yesterday, the government argued Ms Manning's federal lawsuit should be dismissed, saying her claims belong in a military court.
Ms Manning, formerly known as Bradley Manning, is serving 35 years for sending classified documents to the WikiLeaks website.