Lawyers said the woman's life would be in danger if she were sent home
An HIV-positive Ugandan woman's claim to stay in the UK has been rejected by the European Court of Human Rights.
Her lawyers argued that a lack of medical care in Uganda would lead to her early death, and this would amount to cruel and degrading treatment.
The government denies this, saying all NHS HIV drugs are available in Uganda.
The court agreed that if the unnamed woman were sent back to Uganda, there would be no violation of the bar on inhuman or degrading treatment.
When the woman entered the UK in March 1998 under an assumed name, she was seriously ill and was admitted to hospital.
Soon afterwards, solicitors lodged an asylum application on her behalf, claiming she had been raped by government soldiers in Uganda because of her association with the Lord's Resistance Army, a rebel group in the north of the country.
The lawyers argued that her life would be in danger if she were returned to Uganda.
By November 1998, she was diagnosed with two illnesses which are known to be indicators of having Aids, and as being in an extremely advanced state of HIV infection.
Her asylum claim was rejected in March 2001, a decision she appealed against.
In rejecting her claim, the secretary of state found no evidence that Ugandan authorities were interested in her and that treatment of Aids in Uganda was comparable to any other African country.
The secretary of state also found that all the major anti-viral drugs were available in Uganda at highly subsidised prices.
In January the government sent a terminally ill Ghanaian woman who had been receiving treatment in the UK back to her country because her visa had expired.