Washington CNN  — 

South Carolina GOP Sen. Lindsey Graham issued a statement Thursday calling for President Donald Trump to invoke national emergency powers to fund his border wall.

“Speaker (Nancy) Pelosi’s refusal to negotiate on funding for a border wall/barrier – even if the government were to be reopened – virtually ends the congressional path to funding for a border wall/barrier,” Graham said in a statement. “It is time for President Trump to use emergency powers to fund the construction of a border wall/barrier.”

The statement from the key Trump ally came shortly after Graham said efforts to forge a deal with congressional Democrats had fallen flat.

GOP senators gathered in Graham’s office a day prior to discuss a deal that would bring an end to the ongoing government shutdown while securing money for Trump’s proposed border with Mexico.

Trump has repeatedly floated funding his wall by declaring a national emergency. On Thursday, he reaffirmed his position a day after walking out on Democrats at a White House meeting to resolve their impasse over his wall.

“If this doesn’t work out, probably I will do it, I would almost say definitely,” Trump said. “This is a national emergency.”

Democrats have said the move would not withstand legal scrutiny, and some Republicans have expressed hesitancy about the prospect.

South Dakota Sen. John Thune told CNN, “Frankly, I’m not crazy about going down that path.”

“Inevitably, I suspect it probably gets challenged in court,” said Thune, a member of Republican leadership.

Graham seemed to acknowledge the uncertainty around the move in his statement, saying, “I hope it works.”

Earlier Thursday, Graham said it would “get challenged in court for sure as to whether or not this fits the statutory definition of an emergency.”

This story has been updated.

CNN’s Manu Raju and Sarah Mucha contributed to this report.