(Changes sourcing, adds quotes)
By Peter Griffiths
LONDON, Sept 30 (Reuters) - Former Gurkha soldiers who fought alongside British troops won a long-running battle on Tuesday for the right to retire in Britain.
Waving their regiment's flag outside London's High Court, members of the unit which has fought for Britain since 1815 welcomed the decision to overturn a ruling that meant those who retired before 1997 had no automatic right to live in Britain.
All other foreign soldiers in the British Army can settle in the country after four years' service anywhere in the world. About 2,000 Gurkhas are affected by the current rules.
High Court judge Justice Nicholas Blake ruled that instructions given by the Home Office to immigration officials were unlawful and must be changed.
Dozens of Gurkhas and their supporters cheered outside court, waving the regiment's green flag, which bears two kukris, a traditional Nepalese curved knife.
"Today is a wonderful, terrific victory day for the Gurkhas of Nepal," said lawyer Martin Howe, who represented them. "It is a victory for common sense, it is a victory for fairness."
During the hearing, their barrister Edward Fitzgerald said a decision to bar Gurkhas because they were based in Hong Kong until the territory was returned to China in 1997 was unfair.
He rejected a government argument that they did not have close links with Britain.
After the ruling, Home Secretary Jacqui Smith said the rules would be rewritten.
"In light of the court's ruling we will revise and publish new guidance," she said. "We will honour our commitment to the Gurkhas by reviewing all cases by the end of the year." The Ministry of Defence made no comment on the ruling.
Gurkhas were first recruited by colonial rulers in India in the 19th century as a "martial race" known for their bravery. (Editing by Steve Addison)