WASHINGTON – The House failed Tuesday to override President Donald Trump's veto of a congressional resolution aimed at halting his emergency declaration for the southern border.

The battle continues in the courts where opponents of the wall, including the American Civil Liberties Union and 20 states, are challenging Trump's authority to declare a national emergency to build a barrier at the border.

“President Trump can’t take taxpayer dollars to build his wall without Congress’s permission," California Democratic Attorney General Xavier Becerra said in a statement, adding that states "are ready to fight long and hard to stop his fabricated emergency in its tracks.”

House Speaker Nancy Pelosi, D-Calif., said Democrats “reserved the rights" to pursue legal action.

“We’re going to fight the president in the Congress, in the courts and in the court of public opinion, and we will continue to fight,” Pelosi told USA TODAY in an exclusive interview.

She noted the House and Senate's bipartisan vote blocked the resolution, overturning the president's "assault on the Constitution."

"Even though we can’t override his veto, we have established the intent of Congress, and establishing the intent of Congress is a strong argument in the courts,” Pelosi said.

Trump vetoed the congressional resolution this month after a dozen Senate Republicans voted with Democrats to block his national emergency declaration. It was a major rebuke by Senate Republicans on one of Trump’s signature issues.

Trump declared a national emergency along the U.S.-Mexican border Feb. 15 to free up money for a wall. The decision came after Congress rejected his request for $5.7 billion to build the barrier.

As the House debated the vote, Trump met with Senate Republicans across the U.S. Capitol at their weekly policy lunch.

The House voted 248 to 181, falling short of the two-thirds majority required to override a presidential veto. Fourteen Republicans joined Democrats in voting for the measure.The Senate will not take up the measure since it failed in the House, according to the office of Senate Majority Leader Mitch McConnell, R-Ky.

"Thank you to the House Republicans for sticking together and the BIG WIN today on the Border. Today’s vote simply reaffirms Congressional Democrats are the party of Open Borders, Drugs and Crime!" Trump tweeted Tuesday afternoon.

The White House also celebrated the news and blasted Democrats.

"Congressional Democrats attempted to block the President’s National Emergency Declaration – they failed. Democrats continue to ignore the reality that our porous southern border is a magnet for illegal immigration, child smugglers, human traffickers, drug cartels, gangs and many other criminals," White House spokesman Hogan Gidley said.

While many initially Republicans expressed concern over the emergency declaration, including that Trump would divert funds from military projects to pay for the wall, most of the party stuck together.

Only 13 Republicans joined all Democrats in backing the original resolution.

House Republicans argued Tuesday the wall is needed to protect the border, particularly against people trying to enter the country illegally and against drug trafficking.

“There is a crisis at the southwest border that can no longer be denied," said Alabama Rep. Mike Rogers, the top Republican on the House Homeland Security Committee.

Earlier Tuesday, Democratic leaders said they held out hope that some Republicans would join them in overriding the bill.

“Certainly, everyone that cares about the United States Constitution, as many of my Republican colleagues profess to do, should be alarmed at this presidential overreach,” said New York Rep. Hakeem Jeffries, chairman of the House Democratic Caucus. “Pursuant to Article 1 of the Constitution, we have the power of the purse. That prerogative has been invaded by Donald Trump."

An override attempt was always expected to fail because Democrats knew they didn't have the two-thirds majority required in each chamber.

Last week, the administration sent a list of construction projects to Congress that the Pentagon said it could delay to fund the barrier.

The national emergency declaration allows Trump to tap billions in military construction projects, including air traffic control towers. The projects have been approved by Congress, but contracts have not been signed. Pentagon officials said the projects would be delayed, not canceled.

Contributing: Maureen Groppe, Tom Vanden Brook