All Gurkha veterans who retired before 1997 with at least four years' service will be allowed to settle in the UK, Home Secretary Jacqui Smith has said.
Ms Smith told MPs she was "proud to offer this country's welcome to all who have served in the brigade of Gurkhas".
It comes after a high-profile campaign by Joanna Lumley and other supporters of Gurkha rights - and an embarrassing Commons defeat for the government.
Some 36,000 Gurkhas who left before 1997 had been denied UK residency.
Ms Lumley, the actress who has been the public face of the campaign on behalf of the Gurkhas, said: "This is the welcome we have always longed to give."
She called Prime Minister Gordon Brown, who she had met earlier, a "brave man who has made today a brave decision on behalf of the bravest of the brave".
Gurkhas, who are recruited from Nepal, have been part of the British Army for almost 200 years.
'Sacrifice and distinction'
Shadow home secretary Chris Grayling said the U-turn by the government was a "great victory for a well-run campaign, that has publicly embarrassed ministers".
He said it was a shame that the government had had to be dragged "kicking and screaming" to the decision.
Ms Smith's statement was greeted by cheers from MPs.
She told the Commons: "I'm delighted that we have now been able to agree - across government, across the House and with the Gurkhas' representatives - new settlement rights that all those who have served us so well, so highly deserve."
Under the measures outlined in the House, Gurkhas will be allowed to settle in the UK with their spouses and dependent children under 18.
Ms Smith said she expected to welcome 10,000 to 15,000 applications from Gurkhas over the next two years.
She added that some 1,400 outstanding applications for settlement currently before the UK Border Agency would be processed on the basis of the new policy "as a matter of urgency" before 11 June.
Ms Smith added that the Gurkhas had served the UK "with great courage, sacrifice and distinction and they continue to make a vital and valued contribution to our operations around the world".
Chris Huhne, the Liberal Democrat home affairs spokesman, welcomed the statement.
"The prime minister and the minister have finally listened to the will of this House and the will of the British public," he said.
Keith Vaz, chairman of the home affairs select committee, said it was a "historic" day for British democracy and said 21 May will be "remembered as Gurkha Rights Day".
'Sympathy and support'
After the vote, Gurkha veterans and campaigners met the prime minister at Downing Street for what Ms Lumley called an "impromptu garden party".
Gurkha Justice Campaign lawyer David Enright said there was still work to be done to ensure that veterans received pensions in the UK, but said "that is for tomorrow".
He added: "The people wanting to come here are not coming for pensions. They are coming here, on the whole, because they want to work."
The prime minister suffered a shock Commons defeat on the issue, forcing ministers to reconsider existing rules on how many Gurkhas can settle in the UK.
It was followed by an extraordinary piece of Westminster theatre when Ms Lumley - whose father was an officer with the 6th Gukha Rifles - came face-to-face with minister Phil Woolas in BBC studios and quickly won public assurances over future policy at an impromptu joint press conference.
Speaking after Thursday's vote, Mr Woolas acknowledged that the actress had "given a focus" to the campaign, and that she had "campaigned tirelessly" for the Gurkhas.
At Prime Minister's Questions on Wednesday, Mr Brown told the House of Commons that he had a "great deal of sympathy and support" for the Gurkhas.
He added: "I believe it is possible for us to honour our commitments to the Gurkhas and to do so in a way that protects the public finances."