The Senate bill to pay for President Donald Trump’s border wall and other border security measures passed the Senate on Thursday, setting the stage for a likely bipartisan compromise.

The Senate voted 51-49 to approve the spending bill that would provide $1.6 billion for the wall and $2.7 billion to reimburse the government for the cost of implementing it.

Senate Majority Leader Mitch McConnell, R-Ky., said in a statement that the Senate will pass the bill on the floor next week.

The White House on Thursday said the bill would be a critical component of the president’s border security plan, adding that “the Senate should be proud of the work it did to craft a bipartisan border security bill.”

The president, who has been demanding the border wall, said the border fence was a “great, great job” and was an investment that will pay for itself over time.

The president also called the measure “historic” and said it was “important to keep the promise we made on January 20th.”