Sen. Lindsey Graham (R-S.C.) told me yesterday that he’d advised President Trump it would be a huge mistake, substantively and politically, to withdraw all U.S. military members from Afghanistan by the 2020 election.

What he's saying: "When it comes to the election of 2020. I think it would be very easy for the president to defend leaving a counterterrorism force that was recommended by our military and intelligence community, to protect the homeland after the debacle in Iraq."

"It would be hard, in my view, and a high-risk strategy, to reject such advice for political reasons," Graham added. "As to debating Joe Biden, I think it would be easy for President Trump to remind people that: Aren’t you the guy, Biden, who said it was OK to leave Iraq, that led to the rise of ISIS?”

"If he does the same thing that Obama-Biden did, then he’s lost that difference and he owns this. It’s a high risk strategy."

Why it matters: Of all the foreign-policy hawks in the Republican Party, Graham is among a tiny group that has maintained close relations with Trump.

The president doesn’t always take Graham’s advice, but he’ll always take his call and he’ll always hear him out, aides say.

Behind the scenes: Trump tells advisers that withdrawing from Afghanistan is one of the most important promises he made to voters.

He badly wanted to withdraw in the earliest months of his presidency. But in the summer of 2017, he went against his instincts and let his generals persuade him to recommit to Afghanistan.

In recent months, he has grown increasingly impatient behind the scenes and has demanded a quick path to withdrawal from the "endless wars," according to people who have talked to the president.

Some advisers have sought to appeal to Trump's contempt for President Obama as a strategy to keep him engaged in Afghanistan.

"Don’t be like Obama in Iraq. Don’t leave a vacuum that Islamic terrorists will exploit," one adviser said he told the president.

The bottom line: It’s unclear whether any of these pitches have moved the president.

Go deeper: Tom Cotton says he shares Trump's Afghanistan frustration