India’s foreign minister has firmly denied Donald Trump’s claim that the US president was invited by the Indian government to mediate in the Kashmir dispute, following a furious response from opposition MPs.

Trump’s remarks, made sitting alongside the Pakistani prime minister, Imran Khan, on Monday, provoked uproar in the Indian parliament and demands for the prime minister, Narendra Modi, to respond.

While Pakistan has called for third-party involvement over the long-running dispute, India has always insisted the issue can only be resolved through direct talks with Islamabad.

Kashmir, in the Himalayas, is claimed by India and Pakistan in full and ruled in part by both. An insurgency has waxed and waned on the Indian-administered side for three decades, and tens of thousands of people have been killed in the conflict.

Trump’s suggestions were quickly rebutted by Delhi on Monday night and, following heated exchanges in parliament on Tuesday, the foreign minister, Subrahmanyam Jaishankar, issued a strenuous denial.

“It has been India’s consistent position that all outstanding issues with Pakistan are discussed only bilaterally,” he said, amid jeering from MPs. “I would further underline that any engagement with Pakistan would require an end to cross-border terrorism.”

Opposition members walked out in protest, demanding a response from Modi.

During his first visit to Washington as Pakistan prime minister this week, Khan told Trump: “You will have the prayers of over a billion people if you can mediate or resolve this issue.”

Khan later appeared on Fox News, where he said Pakistan and India were poles apart: “Bilaterally, there will never be [an end to the Kashmir conflict] ... I really feel that India should come ... [to] the table. The US could play a big part; President Trump certainly can play a big part.”

Responding to Khan’s comments, Trump said on Monday he had a similar request from India. “It is impossible to believe that two incredible countries who are very, very smart with very smart leadership can’t solve a problem like that,” Trump said. “If you would want me to mediate or arbitrate, I would be willing to do it.”

Analysts believe it is more likely that Trump misinterpreted India’s calls for it to place greater international pressure on Pakistan to crack down on extremism. If Modi had asked for US intervention, this would amount to India “changing its policy on third party involvement entirely, and turning it on its head,” said Rajeshwari Krishnamurthy, associate director of Institute of Peace and Conflict Studies in Delhi.

“One of the possible scenarios, that could have been misinterpreted by Mr Trump, is that during any conversation India might have had with the US, [India may] have asked the US to exert pressure on Pakistan to end terror sanctuaries,” added Krishnamurthy.

Brad Sherman, a Democratic congressman and member of the House foreign affairs committee, said he apologised to the Indian ambassador in Washington for Trump’s statement. “Everyone knows PM Modi would never suggest such a thing. Trump’s statement is amateurish and delusional. And embarrassing,” he tweeted.

Ahead of Khan’s visit, Pakistan arrested Hafiz Saeed, the founder of the terrorist group behind the 2008 attacks in Mumbai. The arrest is likely to have been highlighted by Pakistan as it seeks concessions on military aid and sanctions.

On Tuesday, Khan said that he would try to persuade the Taliban to meet with the Afghan government. “I will meet the Taliban and I will try my best to get them to talk to the Afghan government,” he said, during an appearance at the US Institute of Peace in Washington. The Taliban refused to negotiate with the Afghanistan government of Ashraf Ghani, which it regards as a US puppet.

Following Trump’s remarks, the US state department sought to calm the fallout. Alice Wells, the acting assistant secretary of the department’s Bureau of South and Central Asian Affairs, said: “While Kashmir is a bilateral issue for both parties to discuss, the Trump administration welcomes Pakistan and India sitting down and the United States stands ready to assist.”

• Afghanistan separately called on Tuesday for an explanation of Trump’s comments in which he said he could win the Afghan war by wiping out Afghanistan but did not want to kill 10 million people. The remarks followed his meeting with Khan at which the US president voiced optimism that Pakistan could help broker a political settlement to end the nearly 18-year-old war.

Senior Afghan politicians largely refrained from comment despite the presidential palace’s demand for clarification, but former intelligence chief Rahmatullah Nabil said: “Your insulting message to [Afghanistan] is either accept the [Pakistani] proposal for peace or eventually you may have to use nukes.”

Agence France-Presse and Reuters contributed to this report