The measure got no support from Democrats, who considered it too harsh and said it did not come from consultation with the minority party. Even many Republicans declined to back the bill.

The bill, crafted as a compromise between conservative and more moderate House Republicans, would have funded President Donald Trump 's proposed border wall and limited legal immigration. It also would have enshrined a pathway to citizenship for some young immigrants, known as "Dreamers," and tried to stop the administration practice of splitting up families.

A legislative solution for the Trump administration's separation of migrant children from parents and a path to citizenship for young immigrants brought to the U.S. illegally as children will continue to elude Congress for the time being.

The measure, which came about after weeks of negotiations among Republicans, easily failed in a 301 to 121 vote.

The House overwhelmingly opposed the latest Republican immigration bill on Wednesday, leaving Congress no closer to solving a thorny issue that has bewildered lawmakers for years.

Last week, the House shot down another, more conservative GOP immigration plan.

Wavering Republican lawmakers looking for a push over the finish line got little motivation from Trump, who would see many of his immigration goals met through the bill. On Friday, he told Republicans to "stop wasting their time" on immigration until after the midterm elections. He rightfully pointed out that a Republican-crafted bill has little chance of getting through the Senate.

Then on Wednesday, the president sent a completely different message in a tweet written in all capital letters. "HOUSE REPUBLICANS SHOULD PASS" the bill even if it cannot pass the Senate, he wrote. He added: "PASSAGE WILL SHOW THAT WE WANT STRONG BORDERS & SECURITY WHILE THE DEMS WANT OPEN BORDERS = CRIME. WIN!"

Trump tweet: HOUSE REPUBLICANS SHOULD PASS THE STRONG BUT FAIR IMMIGRATION BILL, KNOWN AS GOODLATTE II, IN THEIR AFTERNOON VOTE TODAY, EVEN THOUGH THE DEMS WON’T LET IT PASS IN THE SENATE. PASSAGE WILL SHOW THAT WE WANT STRONG BORDERS & SECURITY WHILE THE DEMS WANT OPEN BORDERS = CRIME. WIN

Democratic leaders have repeatedly said that they do not want open borders. House Minority Leader Nancy Pelosi criticized Republicans in a tweet for their failure to pass the bill.

Pelosi tweet

It is unclear where Congress will proceed on immigration. Furor over family separation is still bubbling up, despite a Trump executive order designed to end the practice by his administration. Questions remain about whether the action will actually halt the practice, and how the more than 2,000 children in government custody will be reunited with their families.

Lawmakers in both the House and Senate have proposed more narrow legislation to address family separation. Trump, however, has repeatedly pushed to include border wall funding in immigration legislation.

The so-called compromise bill that failed Wednesday came about after centrist members tried to force a vote on immigration policies. House GOP leaders opposed the effort, saying it would not lead to legislation that Trump would sign. Leadership worked across the House GOP to find a potential compromise solution.

The House Republicans who attempted to compel votes could try to do so again.