The biggest part of the funding package obtained under the deal will be spent on humanitarian aid for migrants detained by the US Customs and Border Protection (CBP), as well as to provide funding for processing and caretaking staff. The other part will go to expanding overcrowded detention facilities.

US lawmakers have reached a deal regarding US-Mexico border funding, which had been at a stalemate, The Hill reported Tuesday.

The deal, made by Senate Appropriations Committee Chairman Richard Shelby (R-Ala.) and Senator Patrick Leahy (D-Vt.) – the top Democrat in the panel – would provide border services with over $4.5 billion.

The package includes $3.3 billion for humanitarian aid, which the White House said will be used to increase shelters and care for unaccompanied minors, as well as to process new arrivals. The remaining money will be used for operations including an increase in the number of detention beds and providing more investigation resources, The Hill report says.

Democrats said they approved funding in an effort to provide money to enforce Trump’s immigration and border policies.

"President Trump's proposal had some things that are very needed, which we would support, had some things that are off the table, and some things that would be in a gray area. […] I'd like to see some kind of action that deals with the humanitarian crisis and can pass both the Senate and the House because we’ve got to get it done. It's serious," Senate Minority Leader Charles Schumer (D-N.Y.) told reporters.

A deal appeared unreachable amid bipartisan divisions, and was reported as resurfacing last week, when the two parties found common ground over humanitarian aid. Schumer told reporters last week that humanitarian aid was the “sweet spot” for any deal to be had on Capitol Hill, The Hill reported at the time.

The deal will be marked up for the Senate Appropriations Committee on Wednesday and is expected to get a vote in the Senate before the end of next week. The deal must nonetheless overcome several obstacles before it arrives on Trump’s desk, including garnering support from House Democrats, the report says.

Earlier this year, Trump declared a national emergency as a means of diverting billions of Pentagon funds to construct a barrier on the US-Mexico border in an effort to curb the influx of immigrants illegally crossing into US territory. House Democrats failed in their attempt to rescind the emergency declaration.