The House of Representatives just voted decisively to block President Trump’s national emergency declaration to fund his long-promised southern border wall.

A resolution written by House Democrats passed 245-182 Tuesday evening, as expected, in a rebuke to Trump’s Feb. 15 declaration of executive power after he failed to get the $5.7 billion he wanted through congressional appropriation bills, even after the longest government shutdown in U.S. history. Part of the $8 billion in funding he’s seeking through the end-run around Congress would come from the budgets of other agencies, like the U.S. military.

At least 13 Republicans voted to block the declaration, and 5 House members didn't vote.

The resolution now heads to the Senate, and it will have to go to a vote in the next few weeks due to rules within the National Emergencies Act, then would have to be approved by President Trump if it garners a simple majority. Congress could also achieve a two-thirds majority to override Trump’s eventual veto, which the White House has guaranteed. That majority seems unlikely since the Senate is controlled by Republicans, but a few have already indicated they’d vote with the Dems: Sen. Thom Tillis of North Carolina and Sen. Lisa Murkowski of Alaska have said they agree with their colleagues across the aisle that Trump’s action represents an unconstitutional power grab.

“This will allow a president to sideline Congress for much of domestic policy,” Rep. Joaquin Castro, a Texas Democrat, said ahead of his vote to oppose the national declaration on Tuesday. “It’s clear there’s no emergency at the border.”

Apart from the national emergency declaration potentially being a Constitutional issue, other Democrats have raised concerns there’s racist intent behind it.

“When all other labels have failed to achieve his central campaign promise to build a medieval border wall, he calls people like me a national emergency,” Rep. Jesus Garcia, a Democrat of Illinois, said on the House floor.

House Republicans, meanwhile, pressured their colleagues Tuesday to vote against the measure because “it’s about defeating President Trump,” said Rep. Mark Meadows, a Republican of North Carolina.

“Texas knows something others in this chamber apparently don’t know: We are at war on the southern border with drug cartels from Mexico,” Rep. Pete Olson, a Texas Republican, said in urging others to vote against the measure.

“I hope our great Republican senators don’t get led down the path of weak and ineffective Border Security. Without strong Borders, we don’t have a Country - and the voters are on board with us. Be strong and smart, don’t fall into the Democrats ‘trap’ of Open Borders and Crime!” Trump wrote in a tweet on Monday.

Trump announced the emergency declaration during a bizarre Rose Garden press conference earlier this month, in which he struck a fearmongering tone and falsely said drugs were being smuggled across the border -- the fact is they actually arrive through legal ports of entry. Trump also managed to undercut his own argument when he said he didn’t have to declare a national emergency on the border.

“I didn't need to do this, but I’d rather do it much faster,” Trump said, referring to getting the funding he wanted.

The national emergency declaration is also facing intense opposition on other fronts. Attorneys general in 16 states including liberal strongholds like New York and California have filed a lawsuit opposing the declaration and saying it threatens their states’ funding. And on Monday, 59 former national security advisers wrote a bipartisan letter to say there isn’t a national emergency on the border.