Sen. Lindsey Graham wants President Donald Trump to stick to his guns in the fight over funding for a wall on the U.S.-Mexico border and warned that giving in to Democrats' demands could be "the end of his presidency."

With a partial government shutdown – sparked by the fight over funding for the wall – in its second week, the South Carolina Republican on Wednesday told Fox News host Sean Hannity that GOP lawmakers won't back down "until we get the money." Trump is seeking the approval of more than $5 billion toward the construction of a border wall.

"I'll tell you exactly how this is going to end," Graham told Hannity. "The president is going to challenge the Democrats to compromise and if they continue to say no, they're going to pay a price with the American people."

"If he gives in now, that's the end of 2019, in terms of him being an effective president," Graham said.

"That's probably the end of his presidency," he added.

Exclusive:Nancy Pelosi vows 'different world' for Trump with new Congress, no more 'rubber stamp'

How long will the federal shutdown last?:Here are lessons from previous budget battles

And Graham went a step further, cautioning Republicans, "That's the end of us if we give in on this issue."

Graham's warning came on the eve of Democrats taking over the House of Representatives.

During the 2016 campaign, Trump promised voters a "big, beautiful" concrete wall along the southern border, which Mexico would pay for. The president looked at prototypes of different wall designs earlier this year. But Trump's definition of a wall has fluctuated in recent weeks. On Dec. 21, he tweeted that a barrier of steel slates would be "totally effective." Then 10 days later he tweeted that he was not giving up on a concrete wall in "some areas."

Is Trump's border wall being built?:Here are the facts

More:What happened when Trump visited border-wall prototypes? 5 things to know

The president believes a wall is necessary for national security because it would limit undocumented border crossings, and slow the flow of drugs.

Democrats have opposed such a concrete wall on the grounds that it would be costly, ineffective and would be a negative symbol. But many of them accept the need for a barrier or fence in places along the border. They say a barrier should be part of a comprehensive border security plan that includes the use of new technology such as drones.

On Sunday, Graham said "the wall has become a metaphor for border security, and what we're talking about is a physical barrier where it makes sense."

During a fruitless meeting with congressional Democrats on Wednesday, Trump reportedly indicated that he believes his image is part of what's at stake in the negotiations. According to CNN, Trump rejected a Democratic proposal to temporarily end the shutdown because he worried, "I would look foolish if I did that."

With Republicans like Trump and Graham believing the GOP's future is riding on the outcome of this budget battle – and the Democrats apparently equally unwilling to budge – an end to the government shutdown appears to be unlikely anytime soon.

Nancy Pelosi, expected to be selected as the next speaker of the House, said in an NBC interview Thursday morning that she is unwilling to give Trump any money for a border wall.

"No. Nothing for the wall," she said.

When asked Wednesday how long he was willing to keep the government shutdown in order to get the money he wants for a border wall, Trump told reporters, "As long as it takes."

Contributing: David Jackson and Michael Collins

Government shutdown:How it could hurt the economy

More:House Democrats will move to reopen government as partial shutdown enters its 13th day