Republicans in the Senate rejected an emergency border funding package crafted by Speaker Nancy Pelosi (D-CA) and House Democrats on Wednesday, instead passing their own measure that more adequately lined up with President Donald Trump’s priorities.

Wednesday afternoon the Senate debated H. R. 3401, also known as the Border Supplemental Appropriation Act, which sought to prevent the lapse of federal funding for border control agencies, especially those dealing with unaccompanied migrant children. The bill, which only made it to the Senate after Pelosi was forced to compromise with more progressive members of her caucus on Tuesday, failed by a vote of 37 to 55.

Pelosi’s compromises likely doomed the bill from getting bipartisan support in the Senate. To the chagrin of many, the Speaker allowed progressives to include a provision in the bill requiring private detention facilities along the southern border to meet a set of conditions within six months or risk losing federal funding. Pelosi also acquiesced to demands from progressives like Rep. Alexandria Ocasio-Cortez (D-NY) that the final bill not include additional funding for more detention beds or overtime compensation for ICE officers.

The House version was also controversial because it limited information sharing between the Departments of Homeland Security and Health and Human services regarding unaccompanied migrant children. House Minority Leader Kevin McCarthy (R-CA) lambasted that provision in a fiery speech on Tuesday, saying it would only benefit drug cartels that engage in human trafficking.

“They’re making sure two departments cannot share information in their own government. This [sharing] is necessary to ensure children are not placed with human traffickers or other predators,” McCarthy said. “Maybe if you had a little time, maybe if you didn’t care about politics, you’d allow a little sharing of information for the children.”

Shortly after Pelosi’s bill failed to reach the 60-vote threshold required for passage, Senate Majority Leader Mitch McConnell (R-KY) moved to advance his own supplemental border appropriation. The Senate version allocates $2.88 billion for the federal agency responsible for migrant children and includes additional funding for President Donald Trump’s border control efforts. After limited debate, the Senate passed the measure by a bipartisan vote of 84 to 8.

It is unclear if the bipartisan support will force Pelosi to reverse from her promise to not take up the Senate version.

Sen. Patrick Leahy (D-Vt.), the ranking members on the Senate Appropriations Committee who supported the Senate bill, told The Hill that although he liked Pelosi’s bill, it was unlikely to pass.

“I like the House bill but it’s not a bill we could have gotten through our appropriations committee,” Leahy said. “If they accept the Senate bill which will pass I’m sure, I’d be happy with that.”

On Monday, the White House announced the president would not support any proposal that did not properly address the crisis taking place on America’s souther border.

“The ideological aversion to our Nation’s interior immigration enforcement agency must stop,” the White House said. “We cannot have a sovereign nation if we continue to demean and underfund our enforcement agencies and personnel.”

Trump has signaled his support for the Senate legislation.