PESHAWAR, Pakistan -- A Pakistani court has ordered the release of a radical anti-U.S. cleric who went to Afghanistan with thousands of volunteers to help the Taliban fight against Americans after the 2001 U.S.-led invasion, a defense lawyer said Tuesday.

The development comes amid rising U.S.-Pakistani tensions following President Donald Trump's accusations that Pakistan was harboring militants and the withholding of American aid to Islamabad.

Sufi Mohammad was set free on health grounds and the paperwork for his release was still being processed Tuesday, said defense lawyer Fida Gul.

Mohammad, imprisoned since 2009, is also known as the father-in-law of Mullah Fazlullah, the leader of the Pakistani Taliban who is believed to be hiding in Afghanistan.

Get Breaking News Delivered to Your Inbox

Washington accuses Pakistan of turning a blind eye to militants. Pakistan denies the charge. Last week, Trump said that the United States had "foolishly" given Pakistan more than $33 billion in aid in the last 15 years and had gotten nothing in return but "lies & deceit."

Aizaz Ahmad Chaudhry, Pakistan's ambassador to Washington, accused the Trump administration of ignoring the sacrifices made by Pakistan in the war on terror.

The claim is unfair, Chaudhry told The Associated Press over the weekend, before heading back to Washington.

"We have been the victim of terrorist attacks and how can we tolerate the presence of militants on our soil," he said.

Ties between Islamabad and Washington could be further strained by the release of Mohammad, who back in 2001 issued an edict, or fatwa, for holy war against U.S.-led forces in Afghanistan.

Pakistan has banned the Tehrik Nifaz-e-Sharia Mohammed, or TNSM, pro-Taliban group.