Updated

Pakistan's famous cricket star turned opposition leader Imran Khan has criticized President Donald Trump as "ignorant and ungrateful" after the U.S. leader accused Islamabad of harboring terrorists.

Khan also taunted the Trump administration on Wednesday by challenging the American 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.

Khan's rambling tweets also criticized Pakistan's participation in the U.S.-led war on terror in which Islamabad is a U.S. ally. He said he opposed the war on terror from its outset.

The legendary cricketer, with a reputation internationally as a playboy and in Pakistan as an Islamic conservative, has ambitions to be Pakistan's next prime minister.