Home Secretary John Reid has vowed to push for law changes over the right to remain in the UK after losing a Court of Appeal battle over nine Afghans.
The plane was hijacked in February 2000 and flown to Stansted
Mr Reid appealed against a High Court ruling giving the men, who hijacked an airliner and flew it to the UK in 2000, discretionary leave to stay in the UK.
He said legislation would "deny people in this position leave to remain".
The men were convicted of hijacking the plane - but an appeal court later ruled they had acted under duress.
A lawyer for the home secretary had argued that although the nine Afghans could not be deported because of human rights issues, he could use immigration powers to impose "temporary admission" status on them and curb their freedoms.
But three appeal court judges on Friday dismissed the appeal, saying that there had been "ample time" for the home secretary to get parliamentary backing for his actions, rather than just giving himself new powers.
The Boeing 727 was hijacked in February 2000 in Afghanistan and flown to Stansted in Essex.
The men were convicted in December 2001 - but were freed on appeal two years later when the Court of Appeal found they were acting under duress.
Despite an immigration panel ruling saying the men should not be sent back, the Home Office has refused to give them permission to stay.
In May, a High Court judge angrily accused the Home Office of an "abuse of power" by ignoring its own laws and ordered ministers to pay the highest possible legal costs.
Prime Minister Tony Blair said that decision was "an abuse of common sense".
In Friday's appeal court ruling, Lord Justice Brooke said: "Judges and adjudicators have to apply the law as they find it, and not as they might wish it to be.
"So far as the powers of the home secretary are concerned, the challenges created by the respondents' presence in this country have been apparent ever since they landed here over six years ago.
"There has been ample time for the home secretary to obtain appropriate Parliamentary authority, if he wished to be clothed with the powers he gave to himself without parliamentary sanction."
But responding to the judgement, Mr Reid said the men's presence was undesirable.
"I continue to believe that those whose actions have undermined any legitimate claim to asylum should not be granted leave to remain in the UK," he said.
"I plan to bring forward legislation to do this as part of the early bill to strengthen our immigration laws."
Shadow home secretary David Davis said the problem was of the government's "own creation."
"These hijackers committed serious crimes which should make them incompatible with refugee status," he said.
"They should have been deported in 2004 - especially since thousands of allied troops remain in Afghanistan maintaining the peace."
In a statement in May, the nine asylum seekers said they were desperate to be allowed to work and contribute to UK society.
They also apologised to passengers on the flight they hijacked, for the fear they had caused.