A long-running battle between the NHS and the equality watchdog over transgender people’s right to access fertility services has ended with both sides claiming victory.

Guidance will be issued to all of the country’s 200-plus clinical commissioning groups (CCGs) – the NHS bodies that plan and commission services – saying that refusal to offer fertility services to people who are transitioning will need a strong justification. A failure to provide this could be challenged in court. However, in a move that will dismay some trans rights groups, NHS England need not instruct CCGs that they must offer the services, after the Equality and Human Rights Commission (EHRC) dropped its legal challenge.

The agreement is the culmination of a case that began last August when the EHRC sent a pre-action letter, the first step towards judicial review proceedings, to NHS England, which runs England’s health service, accusing it of failing to provide standard fertility services to transgender patients before they transition.

Transitioning treatment results in loss of fertility. The way to prevent this is extraction and storage of eggs and sperm, a process known as gamete extraction and storage, which allows transgender people to have their own biological children post-transition. At the time the EHRC sent its pre-action letter, its chief executive, Rebecca Hilsenrath, said: “Where appropriate, treatment should be made available in order to ensure that access to health services is free of discrimination.”

The EHRC had called for gamete storage for transgender people to be made available across the NHS as a blanket policy, rather than leaving CCGs to decide, as they do now for any patient seeking fertility services. NHS England rejected the EHRC’s demand and the watchdog launched a judicial review.

It is understood that the EHRC has welcomed NHS England’s decision to issue the guidance, and dropped its legal challenge in response. Sources close to the EHRC described the updated guidance as a considerable improvement that would help combat discrimination against transgender people. But NHS England has welcomed the commission’s decision to drop the case, leaving decisions over the provision of fertility services to the individual CCGs.

It is understood that both sides will announce that they have reached an agreement later this week.

An NHS England spokesperson said: “We are pleased to see that the Equality and Human Rights Commission has abandoned its claim against the NHS, which was without merit.”