Following a flurry of last-minute changes and the quashing of what’s been described as a “mini-revolt” spearheaded by some liberal critics, the Democratic-led House rallied on Tuesday to approve a $4.5 billion emergency border aid bill aimed at assuaging the suffering faced by migrant children and their families at the U.S.-Mexico border.

The bill, which earmarks almost $3 billion for the care of unaccompanied migrant children in the custody of the Department of Health and Human Services (HHS) and more than $1 billion for the provision of shelter and food for migrants detained by the U.S. Border Patrol, passed by a mostly party-line vote of 230 to 195.

Four Democrats, including Reps. Alexandria Ocasio-Cortez of New York and Ilhan Omar of Minnesota, remained vehemently opposed to the bill ― which they said enabled President Donald Trump’s immigration agenda, regardless of the restrictions included within ― and voted no.

Explaining the bill’s purpose, House Speaker Nancy Pelosi (D-Calif.) said the package — which stipulated new health and safety standards for migrants in the government’s care — ensures that detainees have access to basic necessities like “food, clothing, sanitary items, shelter, and medical care.”

“We are providing access to legal assistance. And we are protecting families because families belong together,” Pelosi added.