Senate Democrats on Thursday blocked President Trump’s proposal to end the government shutdown by trading border wall funding for "Dreamer" protections.

The bill needed 60 votes to advance, but it failed 50-47. The only Democrat who was voting for it was Sen. Joe Manchin of West Virginia, and two Republicans voted against Trump's plan: Tom Cotton of Arkansas, and Mike Lee of Utah.

The measure would have funded until the end of the fiscal year all of departments and agencies that have been partially closed since Dec. 22, and would have provided $5.7 billion for a wall along the southwest border. In a bid to pick up Democratic votes, it also included a provision extending for three years all legal protections for "Dreamers" and others here under the Temporary Protected Status program.

Democrats rejected the measure in part because they are seeking permanent legal status and a pathway to citizenship for "Dreamers," but also because they oppose Trump's border wall proposal.

Senators on Thursday were poised to reject a Democratic bill that would re-open the closed government until Feb 8., without any border wall funding, even though some GOP senators were expected to vote for it.

“The last thing we need is another temporary measure,” said Senate Majority Leader Mitch McConnell, R-Ky. “We don’t need to punt from the one year line and set up another crisis just like this a couple of weeks from now.”

Democrats argued the Feb. 8 measure would immediately end the shutdown while providing Congress a couple of weeks to negotiate a longer lasting deal. But Democrats have also signaled to President Trump they will not approve any money for wall funding, so Republicans have been unwilling to support this approach because Trump won’t sign the bill.

Senate Minority Leader Chuck Schumer, D-N.Y., said the two chambers could override a presidential veto.

“We could get the workers paid, even if he won’t sign it,” Schumer said.

This story was corrected to note the final vote was 50-47. The vote was incorrectly announced on the Senate floor as 51-47.