The NHS is able to fund a “game-changing” preventative HIV drug, the High Court has ruled after a charity launched a legal challenge.

The National Aids Trust (NAT) won its battle on Tuesday after NHS England claimed it did not have the power to fund pre-exposure prophylaxis (PrEP).

The “highly-effective” anti-retroviral drug is used to stop HIV from becoming established in the event of transmission.

When taken consistently, it has been shown to reduce the risk of infection in people who are at high risk by more than 90 per cent.

HIV in numbers

NHS England said it was not responsible for HIV prevention earlier this year, claiming that funding PrEP would pave the way for legal challenges from proponents of other “treatments and interventions that could be displaced by PrEP”.

But Mr Justice Green, sitting in London, ruled that NHS England “has erred in deciding that it has no power or duty to commission the preventative drugs in issue”.

He pointed out that while NHS England denied it had responsibility, local authorities do not have funds available, adding: "The potential victims of this disagreement are those who will contract HIV/AIDs but who would not were the preventative policy to be fully implemented."

But NHS England announced it would be appealing his findings, saying his interpretation of legislation was "inconsistent with Parliament’s intention".

Tuesday's ruling was a victory for the NAT, which said the drug was “urgently needed” and is now calling for the NHS to make it available immediately.

Deborah Gold, the charity’s chief executive said the ruling was a "vindication for the many people who were let down when NHS England absolved itself of responsibility for PrEP".

"The judgment has confirmed our view – that it is perfectly lawful for NHS England to commission PrEP – now NHS England must do just that," she added, stressing that the delay to commissioning PrEP is both "unethical and expensive".

"Over 4,000 people are getting HIV every year in the UK – we desperately need further prevention options to add to condom use. PrEP works. It saves money and it will make an enormous difference to the lives of men and women across the country who are at risk of acquiring HIV."

The British Medical Association also welcomed the ruling, saying PrEP could "help save many lives".

Dr Iain Kennedy, chair of the association's public health medicine committee, said: “Cuts to public health budgets are forcing local authorities to make cost savings and since the government took the axe to public health budgets, funding for many preventative services across England, including sexual health and HIV treatment, have been, and will continue to be, under pressure.

“More widely, this is an inevitable symptom of a fragmented and increasingly underfunded public health system.”

World Aids Day 2015 around the world - in pictures Show all 9 1 /9 World Aids Day 2015 around the world - in pictures World Aids Day 2015 around the world - in pictures Indian NGO volunteers light candles in the shape of a ribbon during an awareness rally on the eve of World Aids Day in Agartala, the capital of northeastern state of Tripura, India World Aids Day 2015 around the world - in pictures Government health workers wear masks as they display a streamer during a World Aids Day celebration in Manila, Philippines REUTERS/Erik De Castro World Aids Day 2015 around the world - in pictures Filipino women wear colourful costumes during a World Aids Day celebration in Manila REUTERS/Erik De Castro World Aids Day 2015 around the world - in pictures Indonesian students hold a rally to increase awareness of HIV and AIDS at a university in Surabaya JUNI KRISWANTOJUNI KRISWANTO/AFP/Getty Images World Aids Day 2015 around the world - in pictures An Indian college student poses alongside placards during an event at a local hospital to raise awareness about AIDS on the occasion of World Aids Day AFP PHOTO STR/AFP/Getty Images World Aids Day 2015 around the world - in pictures People Living with HIV AIDS (PLHA) lie on the street during a protest demanding the revival of focus on India's AIDS programme which has been on the decline in the past few years, in New Delhi AFP PHOTO / SAJJAD HUSSAINSAJJAD HUSSAIN/AFP/Getty Images World Aids Day 2015 around the world - in pictures A red ribbon placed at the Puerta de Alcala in Madrid, Spain, by the Collective of Lesbians, Gays, Transexuals and Bisexuals of Madrid (COGAM) EPA/J.P. GANDUL World Aids Day 2015 around the world - in pictures South Korean middle school students hold umbrellas as they form a giant red ribbon during a ceremony to mark World AIDS Day in Seoul AFP PHOTO / JUNG YEON-JEJUNG YEON-JE/AFP/Getty Images World Aids Day 2015 around the world - in pictures Pakistani people hold placards as they attend a rally to create awareness in Peshawar Arshad Arbab/EPA

The World Health Organisation also recommends that people deemed to be at substantial risk of HIV infection are offered PrEP.

NHS England said the ruling meant it could not confirm funding for some other treatments and services to safeguard funding possibly needed for PrEP in the future.

"NHS England will publish a draft policy proposition for the potential commissioning of PrEP for public consultation as soon as possible," a spokesperson said.

"This does not imply that PrEP – at what could be a cost of £10-20 million a year – would actually succeed as a candidate for funding when ranked against other candidate interventions in this year's annual specialised commissioning prioritisation round."

Dr Jonathan Fielden, NHS England’s Director of Specialised Commissioning and Deputy National Medical Director, said Gilead – the pharmaceutical company marketing PrEP under the name Truvada – "will be asked to submit better prices, which would clearly affect the likelihood that their drug could be commissioned”.

Previously started clinical trials researching how PrEP can be commissioned "in the most cost-effective way" will continue running.