Conservative MPs have been accused of trying to change the law to ban foreigners with HIV and Hepatitis B from living and working in Britain.

Nearly 20 Tories backed an amendment to the Government’s controversial Immigration Bill which would have required anyone coming to settle in Britain to prove that they were not HIV positive.

The move was described as “shameful” and “outrageous” by Aids charities. It also drew the wrath of some other Conservative MPs, with Margot James accusing her colleagues of trying to take the party “back to the 80s”.

Download the new Independent Premium app Sharing the full story, not just the headlines

Under the plan, the Home Secretary Theresa May would have been given the power to require all immigrants to prove that they were not HIV positive before being allowed to live in the UK.

The amendment was backed by several senior Tory MPs including Graham Brady, chairman of the powerful back bench 1922 committee.

The amendment was introduced by Dr Phillip Lee, the Conservative MP for Bracknell who is a former doctor. It was also signed by Dr Sarah Wollaston, a former GP.

But it drew a furious response from Aids charities and other politicians who described it as “prejudice in its purest form”. “This amendment shows that there remains a shameful lack of understanding about HIV among some of our elected representatives,” said Deborah Jack, chief executive of the National AIDS Trust.

“The UK has for 30 years resisted entry restrictions and to introduce them at this stage would set us squarely against the international trend to overturn such rules.

“This is HIV prejudice in its purest form.”

Dr Lee claimed his amendment wasn’t about “banning anyone”. “It’s about detecting blood-borne virus carriage,” he said. “Individuals who know they’re HIV positive understand the risk of transmission. Those who don’t do not. After detection can come treatment.”

However, in the end time restrictions meant the amendment was not debated or voted on so will not form part of the Bill, which now goes to the House of Lords.