Migrant youths at a detention center in Homestead, Fla., on Thursday. (Rhona Wise/AFP/Getty Images)

This post has been updated with the latest news.

Even before that photo of a drowned father and daughter at the border landed like a punch to the collective gut Wednesday, Congress was rushing to send billions of dollars to help the government process a record number of migrants at the U.S.-Mexico border.

The House and the Senate passed $4.5 billion packages to aid border officials. But Republicans and Democrats can’t agree on what the money should be used for, and they almost went home or a Fourth of July break Friday at the height of the migrant crisis without doing anything about it.

In the end, there still is no compromise, but it looks like agencies that house unaccompanied minors and were short on cash may get the money they need at the last minute. House Democrats wanted restrictions on the humanitarian standards for housing these migrants, but they agreed Thursday to pass a Senate bill without those restrictions. The fight to instill better conditions for these migrants will come later, House Democrats promised.

The frustrating thing is there’s not really a substantial amount of daylight between the House and Senate bills, said Alex Nowrasteh, an immigration expert at the Cato Institute, a libertarian-leaning think tank.

The fight appears mostly driven by President Trump: There’s a desire on Republicans’ part to give him what he wants on his key campaign issue and a desire on Democrats’ part not to give him any latitude to build a border wall or separate families.

And that’s why this border bill is a perfect example of exacerbated divisions in the Trump era. Here’s a closer look at what’s keeping Congress from a deal to address the border crisis.

The Trump administration asked Congress for the extra money to round up, house and process the hundreds of thousands of migrants who have arrived at the border since October. Key agencies taxed with caring for migrants could run out of money in a couple of days. Both sides in Congress agreed that the money was necessary and quickly got to work.

But as they were working, a few things happened to decrease the chance of compromise:

1) Trump revealed plans for a massive roundup of undocumented immigrants in the country, potentially separating even more children from their parents.

2) Lawyers observing the detention centers at the border for a court case broke their lawyerly code of silence and spoke out about one detention center in particular, in Clint, Tex., saying conditions there are “inhumane” and “horrendous.”

Giving the Trump administration money to continue to house migrants at the border was already an icky vote for liberals such as Reps. Alexandria Ocasio-Cortez (D-N.Y.) and Ayanna Pressley (D-Mass.) to take. They had already said they wouldn’t vote for any funds to detain migrant children. And these two events made them feel as if they were rewarding a president who at every level stood for the opposite of what they stood for.

With that as background, here’s how the legislative debate unfolded:

The Republican-controlled Senate crafted its bill to infuse more money at the border. It mostly focuses on giving money to enforce the border. It also gives money to Immigrations and Customs Enforcement and immigration judges to try to speed up decisions about who can stay and who has to go. (But it’s a nominal amount, Nowrasteh said.)

The Democratic-controlled House crafted its own bill, which gives Trump his money but adds in restrictions on how the government cares of the migrants. It tells Customs and Border Patrol that it must also set new standards of care for migrants and limit how long they can stay in temporary shelters. It does not have that money for ICE or immigration judges.

The House and Senate passed their respective bills, the former characterized by Democrats’ desire to up standards of care for migrants and the latter characterized by Republicans’ desire to speed up the asylum and deportation processes. Now, they’re at an impasse.

This week, lawmakers made a lot of noise about their opponents’ legislation. Senate Majority Leader Mitch McConnell (R-Ky.) said Democrats filled their bill with “poison pill” amendments.

Nowrasteh, who champions conservative immigration policies, says he doesn’t understand why Republicans wouldn’t want to set standards for migrant care, which is the main difference between the House and Senate bill. The Post’s Erica Werner reports that Republicans are also hung up that the House bill doesn’t give money to ICE.

Normally, Republicans have been the ones to back down in immigration standoffs. They are, after all, the party in control of the White House, so what happens at the border is arguably on them. (That’s why Trump decided to reopen the government this year without money for his border wall.)

But this time House Democrats were the ones to compromise. On Thursday, they passed the Senate bill. House Speaker Nancy Pelosi (D-Calif.) was under pressure from moderates in her group to do something for the border and realized if she didn’t pass this bill, she’d risk being seen as the one holding things up.

As Rep. Charles J. “Chuck” Fleischmann (R-Tenn.) told Werner recently: “This should have been an easy situation. But right now, nothing is easy when it comes to the border.”