Free NHS treatment should not be given to failed asylum seekers, according to judges ruling at the Court of Appeal in London.
The statement was made during the case of a Palestinian asylum seeker known as YA. The court heard how the 35-year-old had become involved with Hamas, fleeing in 2002 after being asked to take part in a political assassination.
He claimed asylum in the UK in 2005, but was later refused entry. An earlier appeal against that decision was also refused by a judge who said his main reason for coming to Britain was not a fear of Hamas but a desire to receive medical treatment.
He took his case to the Court of Appeal after being presented with a £9,000 hospital bill for treatment of his liver condition.
Lord Justice Ward said that to receive free health service treatment, the patient must have resided lawfully in the UK for at least a year.
He continued: "Failed asylum seekers ought not to be here. They should never have come here in the first place and after their claims have finally been dismissed they are only here until arrangements can be made to secure their return. In some cases, like the unfortunate YA, that return may be a long way off."
But the judges said health services could make up their own minds on whether to treat failed asylum seekers if they have no money.