The men were initially jailed in Britain for the bloodless hijacking of an Afghan Boeing 727 in February 2000, nearly two years before Afghanistan's repressive Taliban regime was ousted.
Their convictions were overturned on appeal and immigration authorities ruled in 2004 that they should be allowed to stay in Britain as refugees rather than deported - a decision which the government deliberately failed to implement, a High Court judge found Wednesday.
"It is difficult to conceive of a clearer case of conspicuous unfairness amounting to an abuse of power," Justice Jeremy Sullivan said, ordering the government to grant the men and their families discretionary leave to stay in the country.
Home Office Minister Tony McNulty said the government was "disappointed" with the ruling and was considering an appeal.
"It is common sense that to deter hijacking and international terrorism, individuals should not be rewarded with leave to remain," McNulty said in a statement. "It remains our intention to remove them as soon as it is possible to ensure that they can be returned in safety to Afghanistan."
Discretionary leave allows the men and their families, whose applications for asylum have been rejected, to work and apply for benefits in Britain. The Home Office can review their status every six months, though the leave becomes indefinite after five years.
The men hijacked the Ariana Airlines jetliner with 188 people aboard during a flight from Kabul to Mazar-e-Sharif in northern Afghanistan. They forced the crew to fly to Britain and surrendered after a four-day standoff with police at Stansted Airport, northeast of London.
Testimony during the original trial said that the men had been armed with guns and grenades and had threatened to kill passengers and crew members.
After their convictions were overturned, immigration authorities found that sending them back to Afghanistan would violate their human rights by exposing them to possible attack by members of the Taliban.
On Wednesday, Sullivan ordered the British Home Office to pay legal costs to show his "disquiet and concern" at their handling of the case.
"Lest there be any misunderstanding, the issue in this case is not whether the executive should take action to discourage hijacking, but whether the executive should be required to take such action within the law as laid down by Parliament and the courts," Sullivan said.
At first glance, America is mired in presidential showdown, the Republicans and the Democrats are on the brink of war, BLM protesters clash with white cops, and the economy is generally in decline