The Senate passed its version of a supplemental border funding bill after rejecting the House bill passed Thursday night. The Senate's bipartisan bill passed with 84 yeas to 8 nays and comes amid renewed scrutiny over the treatment of young migrants in U.S. custody at detention centers.

The Senate bill includes bipartisan negotiated border security funding language and was expected to pass with the 60 votes necessary. Now it will be returned to the House for consideration, but Congress is leaving at the end of the week for its Independence Day recess, so there is very little time to reconcile the House and Senate versions.

Senate lawmakers hope the House will adopt the Senate bill, since it passed with overwhelming bipartisan support.

Get Breaking News Delivered to Your Inbox

The Senate's bipartisan package provides $4.59 billion in emergency funds to address the humanitarian and security crisis at the border. It includes the following:

$2.88 billion for Health and Human Services to provide safe shelter and care for children in custody;

$1.1 billion for Customs and Border Protection (CBP) to establish migrant care and processing facilities;

$220 million for the Justice Department to help process immigration cases and provide resources to U.S. Marshals Service for care and detention of federal detainees;

$145 million for branches of U.S. military for missions along the border.

The House version of the $4.5 billion border funding bill included oversight provisions to hold the administration accountable for the conditions at migrant facilities, and provided no money for border wall construction. Senate Majority Leader Mitch McConnell derided the House bill as " "a go-nowhere proposal filled with poison-pill riders which the president would veto."

Mr. Trump, as he left for Asia Thursday, was optimistic about the prospects of securing the additional funding for the border.

"We are moving along very well with the bipartisan bill in the Senate. Spoke with Mitch, spoke to a lot of people, we're doing very well and it's very far along. And I believe the House is going to also be getting together with the Senate. Hopefully they can get something done," Mr. Trump said.

He added, "It's humanitarian aid it's very important, and I think that a lot of people are starting to realize that I was right when I said we had a crisis at the border." The president later suggested to reporters that the House and Senate would come together with a "humanitarian aid" package for migrant children.

This is a developing story.

Grace Segers contributed to this report.