The U.S. Senate has passed a bipartisan bill to provide new funds worth $4.6 billion to help President Donald Trump deal with the border crisis.

The Republican-controlled chamber voted 84-8 on the legislation on Wednesday, June 26, not long after rejecting the House version of a $4.5 billion bill on the same day, the Daily Caller reported.

The House measure, which contained tougher requirements for treating detained children, did not pass the Senate after 37 senators approved and 55 rejected it, while it needed 60 votes to pass. Representatives voted for their own immigration package Tuesday night after the Democrats added a number of changes to their bill to garner more support from far-left Democrats.

The Senate-passed bill, including nearly $3 billion in humanitarian aid, will provide care for thousands of migrants streaming into the United States through the southern border.

To deal with border issues, the Trump administration has been asking for new funding, including $3.3 billion for humanitarian assistance, $1.1 billion for border operations and another $377 million for the National Guard and Pentagon to be able to function on the border.

Border migrant apprehensions have been surging in 2019, setting the border crisis on track to be the worst in a decade.

According to the latest data from the Customs and Border Protection (CBP), migrant arrests between ports of entry on the U.S.-Mexico border hit new highs at 132,887 people in May 2019, surging from 99,304 in April and 92,840 in March, and marks the first time the number topped 100,000 since 2007.

The two chambers of Congress will now have to resolve their differences to make a compromise measure that President Trump could sign.

The Associated Press reported House Speaker Nancy Pelosi called President Trump on Wednesday afternoon to discuss the measure, saying there are some improvements she thought could be reconciled.

The president said passing the legislation was urgent and he appeared to leave the door open for negotiations.

“We are moving along very well with a bipartisan bill in the Senate. It’s very far along and I believe the House is also going to be getting together with the Senate to get something done. It’s humanitarian aid. It’s very important,” President Trump said.