Members of the House of Lords, the upper house of the UK parliament, voted in favor of an amendment that called for EU nationals legally resident in Britain to be guaranteed the same status after the UK leaves the European Union.
The measure was passed by 358 votes to 256 in the Lords
, where May's Conservative Party does not command a majority.
The amended bill must now be sent back for consideration to the House of Commons, potentially threatening Downing Street's March 31 deadline to trigger Article 50, the formal start to the Brexit process. In the Commons in February, MPs passed the bill unamended
after being assured that the rights of EU nationals would be protected.
Jeremy Corbyn, leader of the opposition Labour Party, reacted to the news on Twitter, writing, "The government must now do the decent thing and guarantee the rights of EU citizens living in the UK."
The government's defeat came despite a last-minute plea from Home Secretary Amber Rudd, who wrote to peers on Tuesday stressing that the rights of EU nationals will be a top priority once negotiations begin. Rudd sat in the Lords chamber to listen to the debate.
Former Conservative Chancellor Lord Lawson said he supported the sentiment behind the amendment but said it was simply "virtue signaling."
But Lady Hayter, Brexit spokeswoman in the Lords for the Labour Party, said the 3.2 million EU nationals in the UK were being used as "bargaining chips" by the British government.
Lord Bridges of Headley, a Brexit minister, conceded that the future of EU nationals was one of the most emotive issues raised by Brexit. But he suggested that the government was "confident" it could reach a "quick and timely" agreement on reciprocal rights of nationals once Brexit talks begin.
Former Conservative cabinet minister Lord Tebbit was jeered when he criticized peers for focusing on "nothing but the rights of foreigners."
"It seems to me that the first duty of this Parliament of the United Kingdom is to care for the interests of the citizens of this kingdom," Tebbit said. "Why is everybody here today so excited about an amendment that looks after the foreigners and not the British?"
Citing government sources, Britain's Press Association reported that the government will seek to overturn the House of Lords decision in the Commons.
If MPs reject the amendment, the bill could "ping pong" between both houses. Ultimately, the government can invoke British parliamentary convention to force the unamended bill into law without the Lords' approval.