A Republican effort to pass an immigration law is in disarray amid a political battle over migrant children separated from their parents.
A compromise bill drafted by moderate and conservative Republicans lacks any votes from Democratic lawmakers and even some Republicans.
A vote on the bill, which would fund a border wall while reducing legal migration, has been delayed to Friday.
The House rejected a more hardline conservative measure on Thursday.
Republicans joined Democrats to vote by 193-231 to scupper the more hawkish bill.
President Donald Trump earlier in the day blamed Democrats for the ongoing impasse.
At a White House cabinet meeting, he pledged to sign an immigration reform bill if Congress can pass it.
"The lawmakers have to sit down and they have to do something because our country cannot continue to run like this," Mr Trump said.
The congressional deadlock comes a day after the Republican president moved to roll back his policy of migrant family separations amid outcry over the "zero tolerance" policy.
He issued an executive order calling for the children to be kept with their parents, who are being detained on charges of crossing the border illegally.
But the fate of hundreds of children already separated by the policy is unclear.
Dead on arrival
Anthony Zurcher, BBC News, Washington
Comprehensive immigration reform in Congress was dead in February, when the Senate failed to pass any of the measures the chamber was considering.
It was dead earlier this month, after an insurgent effort to force a vote on a bipartisan bill in the House failed. It was dead this week, despite outcry over the border crisis caused by the Trump administration's family separation policy.
It was dead on Thursday, as a hardline bill went down to defeat in the House. Its prospects don't look any better for Friday, when the Republican leadership's "compromise" proposal probably will meet the same fate.
At some point, this Congress has to chisel the headstone and throw flowers on immigration reform's grave. There simply isn't the will – or the willingness to compromise – required to pass legislation before the end of the year.
Donald Trump blames Senate rules that he says give the minority Democrats too much power. Democrats blame the president's fixation on a border wall and sweeping changes to legal immigration programmes. Moderate Republicans blame far-right conservatives, and vice versa.
Congress has been struggling with immigration reform for decades. With mid-term elections looming, politicians will take the issue to the campaign trail – but it's a struggle with no end in sight.
What is in the legislation?
The House bill still under consideration is a compromise between conservatives and moderate Republicans.
It includes funding for a border wall, along with a pathway to citizenship for the Dreamers – immigrants who illegally entered the US as children.
On Thursday, Speaker of the House Paul Ryan said the measure would also fund resources to keep migrant families together while their cases are processed.
The second, more conservative bill that was rejected by the House on Thursday excluded the Dreamers clause.
Republicans control both congressional chambers and the White House.
But with no Democratic backing for the legislation, White House officials and the Republican leadership have been trying to drum up support among rank-and-file lawmakers.
More on child migrant separation crisis
In a rare outburst on the House floor Conservative Republican congressman Mark Meadows slammed the compromise bill as "not ready for primetime".
The Freedom Caucus chairman was reportedly furious with Mr Ryan for leaving out two provisions from the bill, but the two Republicans later said their absence had been the result of a misunderstanding.
Meanwhile, the Senate is working on a narrower compromise bill focusing on the family separations.
Republicans hold a narrower majority in the upper chamber, leading Mr Trump question on Thursday "what is the purpose" of the House voting on "good immigration bills", if they will be struck down by the Senate.