After teasing it for months, President Trump is officially declaring the U. S-Mexico border a “national emergency,” which will allow him to circumvent Congress’s constitutional powers to control spending and divert federal funds toward his much ballyhooed border wall.

His decision to do so, after not getting the money he wanted from Congress to put toward construction of his wall, has drawn immense criticism as an overreach of executive power. So, is it? Can he do this?

Let’s review the basic facts of what it means for a president to declare a national emergency.

What is a national emergency?

In 1976, Congress passed the National Emergencies Act, which permits the president to pronounce a national emergency when he considers it appropriate. The act offers no specific definition of “emergency” and allows a president to declare one entirely at his or her discretion.

By declaring a national emergency, the president avails himself or herself of dozens of specialized laws. Some of these powers have funds the president otherwise could not access.

Under current law, emergency powers lapse within a year unless the president renews them. A national emergency can be re-declared indefinitely, and, in practice, that is done frequently. There have been 58 pronounced under the National Emergencies Act, of which 31 are still in effect.

When have they been declared in the past?

Presidents have declared national emergencies since World War II. As The Washington Post reported, President Bill Clinton declared emergencies 17 times, George W. Bush 12 and Barack Obama 13.

The vast majority have been economic sanctions against foreign actors whose activities pose a national threat, according to Elizabeth Goitein, co-director of the Brennan Center for Justice’s Liberty and National Security Program. A handful of declarations have involved noneconomic crises:

Clinton declared a national emergency during the 1996 Cuba embargo, preventing U.S. ships or aircraft from entering Cuban territory without authorization. Obama declared a national emergency during the H1N1 swine flu epidemic in 2009 to activate disaster plans to set up proper patient treatment.

Bush declared a national emergency after the terrorist attacks of Sept. 11, 2001; the order is still in effect.

Is a national emergency the same thing as an executive order?

In general, national emergencies have been declared through executive orders. An executive order is a command issued by the president that carries the force of law. The power is authorized, in part, by Article II of the U.S. Constitution.

Executive orders direct federal agencies on how to spend available resources. Thousands have been created by past presidents, covering topics as varied as the duties of the commander in chief.

The U.S. Supreme Court has only rarely held an executive order invalid, including one issued by Harry S. Truman in 1952 that seized the country’s steel mills during the Korean War, and another from Clinton in 1995 involving workers on strike.

Executive orders do not create new law or allocate additional funding, which is where Trump has run up against congressional hurdles.

Following his inauguration, Trump issued an executive order making construction of a barrier wall across the southwest U.S. border a federal priority. The wall could not be built unless Congress provided him with the funds.

Trump said conservative pundits don’t decide policy — then praised his favorite talk-show hosts

How does a president declare a national emergency?

A president must issue a written and signed declaration that specifies the specific emergency powers he plans to rely on and invoke.

“Unlike other executive orders, one that declares a national emergency unlocks the powers contained in more than 100 other laws,” Goitein told The Post.

Of the vast statutory powers Trump would avail himself of, Goitein said two could arguably allow him to build the border wall with Defense Department funding. These federal statutes make available funds set aside for military construction projects or repurpose money originally dedicated to civil projects supporting the military and national defense.

What happens once a national emergency is declared?

Even though there aren’t many limits on a president’s ability to declare an emergency, it does not create complete freedom to act.

Anyone directly affected by the order can challenge it in court, which Goitein said will almost certainly happen in this case. Congress can also draft a concurrent resolution to terminate the state of emergency, leading to a somewhat novel act. Ordinarily, congressional resolutions support a president’s declaration of a national emergency.

House Speaker Nancy Pelosi (D-Calif.) is expected to bring up a “joint resolution of termination” in the House. Doing so would force Senate Majority Mitch McConnell (R-Ky.) to also bring up the resolution in the GOP-majority Senate, putting his members in a difficult position.

The House Democrats can also join an outside lawsuit or choose to sue on their own.

Does Congress have enough votes to terminate the emergency declaration?

Like any legislation passed by Congress, the president could veto the resolution unless it has received supermajority support (two-thirds in each chamber). Many Republicans have been critical of this approach by Trump, mainly because they see it as a slippery slope for a future Democratic president using the power to advance his or her policy goals. But it’s unclear whether there’s enough of them to vote against the president (and his base) to override a veto.

Read more:

Democrats will fight Trump’s national emergency with this obscure, nearly 67-year-old legal precedent

Trump’s bewildering national emergency press conference, annotated

‘I didn’t need to do this’: Trump just kneecapped his own case for a ‘national emergency’

Trump invokes emergency powers to build border wall. Here’s how other world leaders use them.