The Defense Department, after months of litigation and controversy over the issue, is establishing a new policy for transgender troops: They can enlist and serve, but only if they stick to their biological sex. No transitioning allowed.

The department issued a memorandum late Tuesday ordering the military to adopt the policy, which will take effect April 12. Under the new rules, troops and recruits can identify as transgender, but must use the uniforms, pronouns, and sleeping and bathroom facilities for their biological sex. They will not be allowed to serve if they have a diagnosis of gender dysphoria, a disorder in which a person’s gender identity does not match their physical gender at birth.

The policy exempts transgender troops who have already transitioned or have begun the medical process. Anyone who defies the regulations in the future would be forced out of uniform.

Pentagon officials were at pains on Wednesday to insist that the new rules — which already face a number of legal challenges — do not exclude people based on gender identity.