(CNN) If President Donald Trump moves to invoke a national emergency at the US border to bypass Congress and obtain funding to build his long-promised border wall, a battle in the courts over the questionable legality of spending those dollars would be virtually guaranteed.

But the United States is no stranger to national emergencies.

In fact, the US has been in a perpetual state of declared national emergency for four decades, and the country is currently under 31 concurrent states of emergency about a spectrum of international issues around the globe, according to a CNN review of documents from the Congressional Research Service and the Federal Register.

The federal government is now nearly three full weeks into a partial shutdown over funding for the President's wall along the border with Mexico. The White House and Democrats in Congress are locked at an impasse: Trump is demanding nearly $6 billion, while House Democrats have vowed not to give him one dollar.

"I have the absolute right to declare a national emergency. I haven't done it yet. I may do it. If this doesn't work out, probably I will do it. I would almost say definitely," Trump told reporters on Thursday morning, essentially vowing to bypass Congress if he can't make a deal. "We have plenty of funds if there's a national emergency."

Read More