(Courthouse News Service) The House of Representatives failed to pass an immigration overhaul backed by Republican leadership on Wednesday, the second time in less than a week lawmakers have rejected a GOP immigration proposal.

Last week, all Democrats joined 41 Republicans in opposing a conservative immigration plan that would have restricted legal immigration, funded President Donald Trump’s proposed border wall and extended the Obama administration program known as DACA, which gave protections from deportation to people in the country illegally who were brought to the United States as children.

Lawmakers were scheduled to vote on the leadership proposal the same day, but pushed back consideration as it tried to cobble together enough support for the compromise package.

The additional time proved unhelpful, however, as the leadership-backed proposal fared even worse than the conservative bill on Wednesday, falling in a 121-301 vote.

The proposal the House defeated Wednesday was billed as a compromise between the conservative and moderate members of the House Republican caucus. It would have provided funding for Trump’s wall, though less than the proposal voted on last week, and given a path to legal status for people eligible for DACA.

The bill also made changes to legal immigration programs by clamping down on the rules for which relatives U.S. citizens and green card holders can sponsor for immigrant visas. Referred to as chain migration, the Trump administration has taken aim at the policy in its negotiations with lawmakers on immigration proposals.

The bill also sought to address the issue of children being separated by their parents at the border by allowing the government to detain families together.

Democrats opposed the bill, calling the family separation component weak and the broader reforms to the immigration system too harsh. They attempted to send the bill back to committee with a procedural measure just before the final vote, but failed.

“We need to continue to be a beacon of hope and aspiration for the rest of the world,” Rep. Adriano Espaillat, D-N.Y., said on the House floor before the vote.

The White House supported the bill and Trump took to Twitter on Wednesday morning to encourage Republicans to support it despite dim prospects in the Senate.

“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,” Trump tweeted, in all capital letters. “Passage will show that we want strong borders & security while the Dems want open borders = crime. Win!”

Shortly before the vote, Rep. Bob Goodlatte, a Virginia Republican who has been marshalling Republican immigration proposals in the House, urged his colleagues to support the bill, calling it a chance at immigration reform that had earned the White House’s support.

“That’s what we need to do today, we need to win by defeating this motion to recommit and passing this important legislation that brings America forward in addressing our immigration issues,” Goodlatte said, referring to the procedural measure the House struck down that sought to send the bill back to committee.

Immediately after the bill’s failure, Trump sought to distance himself from it, telling reporters, “I want them to do what they want.”

“I told them a few hours ago, I said, ‘Look pass something …  or come back to something that would be a variation, but get something you want,” the president said. “The problem with that is that we need Democratic votes in the Senate and that’s why I don’t get overly excited with the House bill right now because it’s not going to pass in the Senate; You’re not going to get the Democrats to vote for anything. We can give them 100 percent of what they wanted, and double it, they still wouldn’t pass it.”

Trump went on to say he believes immigration will be “a great election point” for Republicans come November.

“I think strong borders and no crime, that’s us … and I think that’s going to be a great election point for us,” Trump said.