South Carolina Republican Sen. Lindsey Graham says he encouraged President Trump “to dig in” and not give up his fight to secure funding for a border wall as part of a deal to avert a government shutdown.

Graham, who said he spoke with Trump by phone Tuesday, told reporters, “If I were the president, I would dig in and not give in.”

Earlier Tuesday, the president clashed with Democratic leaders Chuck Schumer and Nancy Pelosi with the cameras rolling in the Oval Office and insisted he's willing to let the government shut down if Congress doesn't approve funding for his U.S.-Mexico border wall.

"If we don't have border security, we'll shut down the government," Trump said.

TRUMP CLASHES WITH PELOSI, SCHUMER ON BORDER SECURITY IN EXPLOSIVE OVAL OFFICE MEETING

Asked about the notion of Republicans being blamed for the shutdown after Trump’s comments, Graham said: “I’m fine with being the party that we’re going to secure our border now. We’re not going to wait any longer. We’re not going to keep kicking the can down the road.”

Graham said it’s a “reasonable request to get more money to build walls where it makes sense.”

Congress last week temporarily averted a partial shutdown amid the funeral services for the late President George H.W. Bush, pushing the new deadline to Dec. 21. But border wall funding remains the sticking point as Trump and congressional leaders try to hammer out a government spending package. Trump wants $5 billion for the project, while Democrats are offering $1.3 billion for border security.

Pelosi said she and many other Democrats consider the wall "immoral, ineffective and expensive." Schumer has previously said Democrats want to work with Trump to avert a shutdown, but said money for border security should not include the concrete wall Trump has envisioned.

Trump, calling for the border wall funding, has referred  to illegal immigration as a "threat to the well-being of every American community."

Fox News’ Jason Donner and Judson Berger contributed to this report.