WASHINGTON/NEW YORK (Reuters) - Congress and the White House were attempting to broker a deal over how to spend emergency aid to address the migrant surge as lawmakers, private companies and presidential candidates raised alarms about immigrants facing dangerous conditions along the U.S.-Mexico border.

The Republican-controlled Senate passed by an overwhelming 84-8 vote a $4.6 billion spending bill on Wednesday. The Democratic-led House of Representatives on Tuesday night tied more strings to its approval of the money, setting standards for health and nutrition of migrants in custody after reports they lacked necessities such as soap and diapers.

Now the two chambers are trying to strike a compromise to send to U.S. President Donald Trump before Congress recesses at the end of this week for the Fourth of July holiday.

The House on Thursday will consider adding to the Senate-passed bill several requirements that were in the House version, including medical, nutrition and hygiene standards for facilities holding migrants, and a three-month limit for any child to spend at an intake shelter, said House Speaker Nancy Pelosi. It would also require the death of a child be reported within 24 hours.

Trump has made cracking down on immigration a centerpiece of his administration but officials are saying they will run out of money for border agencies soon. Border crossings hit the highest level in over a decade in May, straining resources and creating chaotic scenes at overcrowded border patrol facilities.

The need for funding has become more urgent as attorneys last week called attention to more than 300 children detained in squalid conditions at a border patrol facility in Clint, Texas.

Children are supposed to be transferred quickly out of border patrol facilities and into shelters overseen by the Department of Health and Human Services (HHS).

Slideshow ( 4 images )

There are currently 178 children in border patrol facilities who have been there longer than 72 hours, Representative Diana DeGette said she was told by HHS on Wednesday.

Adding to concerns was a harrowing photo published this week of a Salvadoran migrant and his young daughter who both drowned crossing the Rio Grande from Mexico.

Trump has said U.S. asylum laws, which allow those who claim fear of returning to their home countries to seek protection through a U.S. court process, need to be changed to deter migrants from coming. But so far the president has failed to push through any changes in Congress.

At this pivotal time in U.S. border policy, the head of the U.S. immigration agency is resigning on July 5. The head of U.S. Immigration and Customs Enforcement (ICE), Mark Morgan, will take his place, an official said.

ICEBOXES AND PRIVATE DETENTION CENTERS

Immigration advocates have long complained about inadequate conditions in border patrol facilities, often called “hieleras” - or “iceboxes” - by the immigrants held there because they are so cold.

Slideshow ( 4 images )

But the stark images and descriptions of detention conditions has spurred some companies and employees to take action.

On Wednesday, several hundred people, including employees of Wayfair Inc, rallied in Boston to protest the online retailer’s sale of furniture for a detention facility in Carrizo Springs, Texas housing migrant children.

Also on Wednesday, Bank of America Corp said it will no longer finance operators of private prisons and detention centers, joining peers in distancing itself from a sector that has triggered protests over Trump’s policies.

ICE typically detains adults who have been arrested in the interior of the United States or arrested at the border, and contracts with private companies like CoreCivic Inc and GEO Group Inc, two major private prison operators. Bank of America has underwritten bonds or given syndicated loans to both companies.

Private detention centers account for about two-thirds of people held by ICE, S&P Global Ratings estimated last year.

With younger and younger children crossing the border and being held for longer periods of times, the issue is becoming a flashpoint of debate ahead of the 2020 presidential elections.

Democratic candidates Elizabeth Warren and Amy Klobuchar, both U.S. senators, visited a different private facility in Florida on Wednesday holding thousands of unaccompanied migrant children. Close to a dozen other candidates, including Senator Kamala Harris, Senator Bernie Sanders and Mayor Pete Buttigieg, said they would tour the same center later this week.

Immigration advocates have said the Homestead facility, which houses more than 2,000 teenagers apprehended at the border, does not meet basic safety and wellness standards.