A former Republican congressman says his party would have been up in arms if a Democratic president considered declaring a national emergency over an issue, as President TrumpDonald TrumpIran claims U.S. to lift all oil sanctions but State Department says 'nothing is agreed' Ivanka Trump, Kushner distance themselves from Trump claims on election: CNN Overnight Defense: Joint Chiefs chairman clashes with GOP on critical race theory | House bill introduced to overhaul military justice system as sexual assault reform builds momentum MORE threatened to do this week.

Former Rep. Joe Walsh (R-Ill.) tweeted Thursday that Republicans would have been "storming the White House" during if former President Obama ever considered such a plan.

"My side would be storming the White House if Barack ObamaBarack Hussein ObamaObama: Voting rights bill must pass before next election The world's most passionate UFO skeptic versus the government Biden plans to host Obama for portrait unveiling that Trump skipped: report MORE ever thought about declaring a national emergency," Walsh wrote.

Trump this week threatened to declare a national emergency to reallocate funding for his border wall.

Republican lawmakers met Trump's plans with skepticism, warning that any declaration of a national emergency over immigration would almost certainly be met with court challenges.

ADVERTISEMENT

“Although the president does have national emergency declaration powers … this would be a dubious constitutional authority and would clearly be challenged in the courts," Maine Sen. Susan CollinsSusan Margaret CollinsSenators say White House aides agreed to infrastructure 'framework' The Hill's Morning Report - Presented by Facebook - GOP torpedoes election bill; infrastructure talks hit snag White House digs in as infrastructure talks stall MORE (R) told reporters this week.

“I just don’t think you can repurpose more than $5 billion from the defense budget for purposes unrelated to what the money was appropriated for," she added.

Other Republicans in the Senate concurred, questioning whether such a strategy would truly be faster than the White House reaching a deal on immigration reform and border security with Congress.

“I think it adds new layers of complexity because we know the first thing that will happen is somebody will file a lawsuit, and it won’t be resolved for weeks, maybe months, maybe even years,” Texas Sen. John CornynJohn CornynSenators say White House aides agreed to infrastructure 'framework' Cornyn calls on Biden and Harris to visit southern border: 'Y'all come visit' Progressive groups launch .5M ad buy to pressure Sinema on filibuster MORE (R) said.

The federal government's partial shutdown, which was sparked by an impasse over funding for a border wall, is in its 20th day with no resolution in sight.