The Government suffered a symbolic defeat when MPs voted by 267 to 246 on a Liberal Democrat motion to give all Gurkha soldiers equal right of residence in Britain.
Commenting after the vote defeating the Government, Liberal Democrat Leader, Nick Clegg said:
"This is a historic victory for the Gurkhas who have served our country so bravely.
"This Government has now lost its moral authority. From the first moment I challenged Gordon Brown on this over a year ago, he didn't understand that there was a simple moral principle at stake.
"People who are willing to die for our country, should be allowed to live in our country.
"The Government must listen to Parliament and scrap these shameful rules immediately and grant justice without conditions to all retired Gurkhas."
This is the biggest Commons victory achieved by the Liberal Democrats since their formation two decades ago, and is the first time a government has lost an opposition day debate since James Callaghan in January 1978.
After the vote Mr Clegg joined actress Joanna Lumley, who has been campaigning on the issue, and Gurkhas outside Parliament.
Mr Clegg said: "This is an immense victory on a series of fronts: for the rights of Gurkhas who have been waiting so long for justice, a victory for Parliament, a victory for decency."
He added that it was "the kind of thing people want this country to do".
Immigration minister Phil Woolas told MPs new proposals would be published before Parliament's summer recess.
In a statement, he said: "This government respects the will of the House of Commons."
He added that all outstanding applications for UK residence by Gurkhas would be dealt with by the end of May.
This is Gordon Brown's first significant defeat as prime minister and it came despite last-minute concessions being offered to rebel Labour MPs.