Updated

A coalition of moderate Democrats and Republicans approved crucial border funding legislation late Thursday in the House, sending the $4.6 billion bill to President Trump's desk for his expected signature -- after Speaker Nancy Pelosi backed down from a push to include restrictions on immigration enforcement that could have scuttled the measure.

In doing so, Pelosi risked a severe backlash from the progressive base calling for those measures, convinced that so-called "guardrails" must be imposed to prevent alleged abuses by border officials.

But the speaker agreed to bring the bipartisan Senate-passed bill to a vote, without such restrictions, following intense pressure from Republicans and moderates in her own party. The Senate had demonstrated that bipartisan support by approving the bill 84-8 a day earlier, after rejecting an earlier House version.

SENATE OKS BIPARTISAN BORDER BILL AFTER REJECTING 'POISON PILL' HOUSE VERSION, AS CLOCK TICKS

While liberal members wanted to put restrictions back in the Senate bill, members were running up against a deadline with the July 4 recess about to begin. In explaining her decision, Pelosi cited the urgent need to get funding to help children caught in the humanitarian crisis at the southern border.

“In order to get resources to the children fastest, we will reluctantly pass the Senate bill. As we pass the Senate bill, we will do so with a Battle Cry as to how we go forward to protect children in a way that truly honors their dignity and worth,” she wrote in a letter to colleagues.

The bill passed 305-102.

The decision is sure to fuel new unrest inside the caucus. Perhaps the most outspoken member of the progressive wing, Rep. Alexandria Ocasio-Cortez, D-N.Y., had declared "Hell no" to voting on the Senate bill.

"That’s an abdication of power we should refuse to accept. They will keep hurting kids if we do," she tweeted.

Measures sought by liberal members included those to ensure the health and safety of those in custody, limit the amount of time unaccompanied minors can spend at an influx shelter to 90 days, and reduce funding for ICE by $81 million.

But the House vote would still ease a cash crunch at federal agencies that care for migrants that have flocked over the border in huge numbers seeking asylum. Vivid and painful accounts of harsh, even dangerous conditions at badly overcrowded federal facilities that house and care for thousands of migrants added to the pressure to act.

The rapid-fire sequence of events Thursday afternoon came after Republicans persistently called on House Democrats to pass the Senate bill in its “clean” form, noting that the White House said it would sign that bill. The White House had threatened to veto the House version.

“The Shelby-Leahy legislation has unified the Appropriations Committee. It has unified the Senate. The administration would sign it into law,” Senate Majority Leader Mitch McConnell, R-Ky., said in a statement. “So all our House colleagues need to do to help the men, women, and children on the border this week is pass this unifying bipartisan bill and send it on to the president.”

The White House said in a statement that “the only ones delaying help for the children are the Democrats” and accused Democrats of having refused to work with Republicans.

“We have already negotiated a broadly supported bipartisan funding bill. It is time for House Democrats to pass the Senate bill and stop delaying funding to deal with this very real humanitarian crisis,” the statement said.

In an astonishing spectacle, dozens of Republicans lined up in the aisles earlier Thursday to submit unanimous consent requests to take up the bill -- with each one being shut down each time by Rep. Sheila Jackson Lee, D-Texas.

“This bipartisan bill passed the Senate with 84 votes and it could be sent to the president’s desk for his signature today,” each lawmaker said in turn.

“As the chair has previously advised the unanimous consent request cannot be entertained,” Jackson Lee said after each request.

Heated words were exchanged, with Rep. Paul Mitchell, R-Mich., accusing Democrats of having handed control to a small group of far-left lawmakers, and urging them to pass the Senate bill: "Unless you decide you’re going to turn over the gavel to a fragment of your conference to make decisions for you."

Rep. Jim McGovern, D-Mass., shot back by accusing Republicans of engaging in “antics.”

“These kids that we are here to try and protect deserve more than grandstanding -- they deserve medicine, soap and clothing,” he said.

Pressure was increasing on lawmakers amid continued reports of poor and unsanitary conditions at detention centers. The publication of an image of a migrant and his daughter found drowned in the Rio Grande has only fueled the debate nationally.

CLICK HERE FOR THE FOX NEWS APP

Republicans, meanwhile, have continued to focus on closing loopholes that encourage migrants to make the perilous journey with children through Central America in order to be released into the U.S. It is those loopholes, they say, that have led to hundreds of thousands of migrants arriving at the border in recent months -- many of them family units.

“In addition to aid, Congress must close the catastrophic loopholes that are driving the Crisis,” Trump tweeted Wednesday. “We must end incentives for Smuggling Children, Trafficking Women, and Selling Drugs.”

Fox News' Chad Pergram and Mike Emanuel contributed to this report.