Send this page to someone via email

On his way from the White House on Thursday, U.S. President Donald Trump told reporters that he would almost “definitely” declare a national emergency to end a government shutdown if his demands for a border wall are not met.

Trump was on his way to McAllen, Texas, on the Mexican border, when he made the statement.

WATCH: A look back at the times Donald Trump said Mexico would pay for the wall

2:28 A look back at the times Donald Trump said Mexico would pay for the wall A look back at the times Donald Trump said Mexico would pay for the wall

The president added that his lawyers had told him he had the power to invoke national emergency powers to get his wall funded, a course of action that Democrats have said may be illegal.

Story continues below advertisement

“I have the absolute right to declare a national emergency,” Trump told reporters at the White House. “I’m not prepared to do that yet, but if I have to, I will.”

Trump has maintained that a government funding bill to end the shutdown include US$5.7 billion for a border wall, a promise that featured prominently in his presidential campaign.

If Congress refuses to budge on the border wall funding, Trump said he probably would declare an emergency. “I would almost say definitely,” he said.

WATCH: Trump says ‘the wall that we’re doing is very hard to penetrate’

0:38 Trump says ‘the wall that we’re doing is very hard to penetrate’ Trump says ‘the wall that we’re doing is very hard to penetrate’

The declaration would override Congress’s power over the national budget, giving Trump the ability to redirect money from the U.S. Department of Defense to his proposed wall.

Story continues below advertisement

Trump has hinted that he’s prepared for the shutdown to stretch into late January by cancelling plans to attend the World Economic Forum in Davos, Switzerland, which begins on Jan. 22.

WATCH: Trump: I can declare a national emergency, but I shouldn’t have to

1:53 Trump: I can declare a national emergency, but I shouldn’t have to Trump: I can declare a national emergency, but I shouldn’t have to

Senator Joe Manchin, a moderate Democrat who has good relations with Trump, said a national emergency declaration by Trump would be “wrong, but I think that’s his only way out” of the government shutdown impasse.

If Trump were to make such a declaration, Manchin predicted the Senate would immediately pass legislation to fund the federal agencies that have been partially closed.

“If he did it tonight, everybody would be right here to vote,” Manchin told reporters.

Story continues below advertisement

As a result of the shutdown, approximately 800,000 government employees will miss their first pay cheques this coming Friday.

WATCH: Trump says he should have smashed the table during talks with Pelosi, Schumer but he didn’t

1:25 Trump says he should have smashed the table during talks with Pelosi, Schumer but he didn’t Trump says he should have smashed the table during talks with Pelosi, Schumer but he didn’t

The most recent talks held between Republicans and Democrats to end the shutdown concluded with the president storming out of the meeting and calling them harder to deal with than China.

— With files from Reuters.