President Donald Trump, an opponent of the involvement of US troops in Afghanistan, was apparently influenced by a remark from Prime Minister Narendra Modi while aides debated the administration’s policy for the war-ravaged country in the summer of 2017.

He was leaning towards leaving, or a change in strategy if the decision was to stay. As he grilled his top officials – defence secretary James Mattis, then secretary of state Rex Tillerson, then National Security Adviser HR McMaster and others – at a White House meeting on July 19, he brought up Modi, according to Bob Woodward’s new book Fear: Trump in the White House.

It was also at this National Security Council meeting that Trump suggested cutting off all security-related aid for Pakistan – nearly six months before he actually suspended funding on January 1 – saying Islamabad wasn’t helping Washington in the Afghan war.

“Trump pivoted,” Woodward writes. “Prime Minister Modi of India is a friend of mine, he said. I like him very much. He told me the US has gotten nothing out of Afghanistan. Nothing. Afghanistan has massive mineral wealth. We don’t take it like others—like China. The US needed to get some of Afghanistan’s valuable minerals in exchange for any support. ‘I’m not making a deal on anything until we get minerals.’ And the US ‘must stop payments to Pakistan until they cooperate.’”

Trump may have been referring to his conversation with Modi during their first meeting in Washington in June 2017. “Never has a country given so much away for so little in return” as the US had in Afghanistan, Modi had said to Trump, according to The Washington Post.

Nothing of significance has emerged from the efforts to exploit Afghanistan’s minerals, but Trump’s Afghanistan-centric South Asia strategy, unveiled in August 2017, said the US would stay with additional troops. It accorded a larger role to India in reconstructing Afghanistan and put Pakistan on notice.

During the meeting, according to Woodward’s book, Trump said: “Pakistan isn’t helping us. They’re not really a friend” despite the $1.3 billion a year in aid the US gave them.” He refused to send any additional aid. The US, Trump said, “must stop making payments to Pakistan until they cooperate”.

In January, Trump raged about Pakistan’s “lies and deceit” and the administration announced the suspension of nearly $2 billion in security-related aid.

Woodward cites another conversation about India between former chief of staff Reince Priebus and McMaster, who discussed Modi’s then upcoming visit. Woodward writes that Modi wanted to go to Camp David, the presidential retreat located a short distance from DC, “have dinner, bond with Trump”.

Priebus wouldn’t have any of it and said there will be a dinner in the White House. “It’s what the president wants.”

McMaster had exploded. “‘What the f…?’ McMaster blew up. ‘It’s India, man. It’s f…… India.” The visitors had to settle for a cocktail reception hosted by First Lady Melania Trump and dinner.