Scientists introduced HIV to blood samples from 23 people with a form of muscular dystrophy. (Getty)

Scientists in Spain have discovered that people with a rare genetic anomaly are resistant to HIV infection, a finding which could lead to new treatments for the virus.

Researchers from the Institute of Health Carlos III, in Madrid, tested blood samples from 23 distantly-related donors who all had a particular form of muscular dystrophy.

When scientists introduced HIV to the samples, the virus failed to replicate.

This immunity was due to the TNPO3 gene, which is needed in order for HIV to spread through the blood.

The test subjects all had a mutation of this gene, which was responsible for their form of muscular dystrophy, but also appears to have given them immunity from HIV.

José Alcami, a virologist who worked on the study, said: “This helps us to understand much better the transport of the virus in the cell.”

UN wants to end HIV diagnoses by 2030.

The United Nations has set a 2030 deadline to end the AIDS epidemic by achieving zero new transmissions.

It has also set a 90-90-90 target for 2020, by which 90 percent of all people living with HIV will know their status, 90 percent of all people diagnosed with HIV will receive antiretroviral therapy (ART), and 90 percent of all people on ART will not be able to transmit the virus.

In England, rates of new transmissions have fallen by a third since 2015 and now sit at their lowest level since 2000.

However, charities have warned that more needs to be done in order for England to meet the 2030 deadline.

The preventative medication PrEP (pre-exposure prophylaxis) can stop the virus from being transmitted, however it is currently only available to English patients through a capped trial.

The NHS says that it still has 12,400 places available on the PrEp Impact programme, with the trial set to close to new participants in July 2020.

NAT (National AIDS Trust) and the Terrance Higgins Trust have both called on the government to make PrEP freely available to all who need it.

“‘More of the same won’t cut it,” said Ian Green, chief executive of Terrance Higgins.

“We need to ensure access to and awareness of HIV prevention pill PrEP, the normalisation of regular HIV testing, and to invest in sexual health services across the country to make sure they are properly funded to meet rising demand.”