Two concessions on the right of former Gurkhas to settle in the UK have been made by the government in an effort to avert a potential Commons defeat.
The government has lost a Commons vote on its policy of restricting the right of former Gurkhas to settle in the UK.
Ministers have promised to start a review of rules by the summer - and said veterans would not be deported.
MPs voted by 267 to 246 in favour of a Lib Dem motion that the government should extend an equal right of residence to all Gurkhas.
Gordon Brown came under fire at PM's questions from Tory leader David Cameron and Lib Dem leader Nick Clegg, who called the policy "shameful".
Earlier Lib Dem leader Nick Clegg said the current policy, announced by the government last week, was "shameful".
Many Labour MPs expected to rebel in a vote are not expected to do so now.
Gordon Brown said earlier he wanted justice for the Gurkhas but any policy change had to be affordable.
New rules
The BBC understands Labour rebel MPs have welcomed the concessions, making it more likely the government will win Wednesday's vote in a Liberal Democrat-led debate.
Some 36,000 former Gurkhas have been denied residency because they served in the British army before 1997.
Ministers had introduced new rules allowing more soldiers to settle here based on long service, medals received, and those injured in battle.
It is fantasy to suppose that more than a fraction will want to settle in the UK Chris HuhneLib Dems
The Home Office said that new rules would allow about 4,300 more to settle, but the Gurkha Justice Campaign said it would be just 100.
Earlier Mr Clegg, whose party has been campaigning on the issue, told the prime minister that the limit on former Gurkhas was "shameful" adding: "If someone is prepared to die for this country, surely they deserve to live in this country."
Tory leader David Cameron also said recent changes to the settlement rules were "too restrictive" and did not honour the obligation to the soldiers or have public support.
'Honourable men'
Mr Brown said that the new rules would allow 10,000 Gurkhas - including their families into the UK.
He said he was "determined" to honour the contribution made by the Gurkhas but said progress on allowing more to settle in the UK would have to be done in stages because of financial constraints.
But later, in a letter to Labour MP Martin Salter, Home Secretary Jacqui Smith said she would "begin work" on a review of further policy changes before the summer recess.
These brave men have risked their lives battling for this country, and it is nothing short of a betrayal by Labour ministers Angus RobertsonSNP
She also said the 1,350 individuals who had outstanding applications for settlement would receive an answer by 11 June.
While they would be considered on a case-by-case basis, she added: "I cannot foresee circumstances in which these honourable men, who have served the UK so well, would ever be removed from the UK."
Opening the Lib Dem-led debate, party home affairs spokesman Chris Huhne said government arguments about too many people coming to the UK if rules are relaxed was "nonsense on stilts. It is based on nothing at all...
"It is fantasy to suppose that more than a fraction will want to settle in the UK."
He also said the government had shown a "cavalier attitude" to costs and made a "wild guess" at the number of soldiers wanting to live here.
The Conservatives have confirmed they will support the Lib Dem motion while some Labour MPs had been expected to back it.
And SNP Westminster leader and defence spokesman Angus Robertson has also confirmed the SNP will back the Lib Dem motion.
He said: "The UK government's treatment of the Gurkhas is simply shameful. These brave men have risked their lives battling for this country, and it is nothing short of a betrayal by Labour ministers to deny them residency."
The cross party home affairs select committee had also tabled a separate motion attacking the "unnecessarily restrictive, morally wrong and offensive" restrictions.
Immigration regulations introduced in 2004 allowed serving Gurkhas with at least four years' service to move to the UK.
However, they do not apply to those discharged from the Army before 1 July 1997, when their base relocated from Hong Kong to Folkestone, Kent.
The High Court ruled last year that the government policy on older veterans was unlawful and in need of urgent review.
Last week the Home Office said Gurkhas who left service before 1997 and who wanted to come to the UK should meet criteria involving long service, bravery medals and medical conditions caused by service in the brigade.
Immigration Minister Phil Woolas said last week that letting all 36,000 Gurkhas in to the UK would lead to "massive pressure" on the immigration service.
Dozens of protesters have gathered at Westminster, among them actress Joanna Lumley, whose father served in the Gurkha regiment.