The House on Tuesday failed to overturn President Donald Trump’s first veto, leaving the declaration of a national emergency at the southwestern border intact despite the bipartisan passage of a resolution attempting to nullify the president’s circumvention of Congress to fund his border wall.

Despite concerns about the constitutional separation of powers and the effect on local military projects, the 248-181 vote fell short of the two-thirds majority needed to kill the national emergency declaration.

Republicans in both chambers had joined Democrats in passing the resolution disapproving his national emergency just weeks ago, voicing discomfort over the president’s intent to divert funding to the construction of a border wall without congressional approval. Trump, issuing the first veto of his administration, had called the resolution “dangerous,” “reckless,” and a “vote against reality.” But only 14 Republicans ultimately joined House Democrats in voting to override the veto.

Trump then thanked House Republicans “for sticking together.” “Today’s vote simply reaffirms Congressional Democrats are the party of Open Borders, Drugs and Crime!” he wrote on Twitter.

Democrats had hoped that the publication of all the military construction projects that could see funding delays as Trump pursued wall money would sway their Republican colleagues. They framed the vote around both lofty constitutional principles and parochial home-district matters.

“Even when the legislative branch disagrees with the executive, we respect the office the president holds, and it’s his right to veto legislation,” said Speaker Nancy Pelosi of California, speaking on the floor before the vote. “But when those decisions violate the Constitution,” she added, “then that must be stopped.”

House Republican leaders, however, derided the vote as political gamesmanship and a waste of time.

Democratic lawmakers and aides say they have not ruled out the possibility of reintroducing the resolution in six months, and they could use other legislative options to block the effort to take as much as $3.6 billion in military construction funds for the wall.

For now, the political fight over Trump’s national emergency declaration shifts to the courts, where a number of states and organizations have joined lawsuits challenging the legal merits of the order.