CRICKET star turned opposition leader Imran Khan has criticised Donald Trump as “ignorant and ungrateful” after the US president accused Pakistan of harbouring terrorists.

Khan also taunted the Trump administration by challenging the president to explain how “a couple of thousand or so [Taliban-allied] Haqqanis allegedly in Pakistan are supposed to be the cause of why the most well-equipped military force in history ... cannot succeed” in Afghanistan.

In a series of rambling tweets, Khan also criticised Pakistan’s participation in the US-led war on terror in which Islamabad is a US ally. He said he opposed the war on terror from its outset.

The cricketing hero, with a reputation internationally as a playboy and in Pakistan as an Islamic conservative, has ambitions to be Pakistan’s next prime minister. Khan’s denunciation followed top Islamabad officials’ response to Trump’s New Year’s Day tweet against Pakistan.

Washington has confirmed it will withhold $255 million (£188 million) in US military aid to Pakistan this year, following a threat from last August when Trump announced an Afghan policy which took aim at neighbouring Pakistan, demanding an end to Islamabad’s alleged support for the Afghan Taliban.

Pakistan denies supporting militants, pointing to its own war against extremist groups battling to overthrow the government. The war in Afghanistan has now entered its 17th year, with an ever-growing mix of insurgents and militant factions operating in the country, including a Daesh affiliate in the region.

“Pakistan has now suffered the ultimate insult [by] being made the scapegoat for US failures in Afghanistan,” Khan tweeted.

On Monday, Trump tweeted that the US had “foolishly” given Pakistan more than $33 billion in aid in the last 15 years and had gotten nothing in return but “lies & deceit”.

On Tuesday, Pakistan’s civilian and military leadership said Trump’s tweet ran counter to meetings held with US secretary of state Rex Tillerson and defence secretary Jim Mattis following the announcement of Trump’s Afghan policy.