Pakistan released a pro-Taliban leader Monday who sent thousands of militants to fight against the U.S.-led invasion of Afghanistan, officials said.

There was no immediate comment from the government on the freeing of Sufi Muhammad, but the move appeared to be part of efforts to broker peace with Islamic militants in Pakistan's Swat Valley.

Muhammad, the father-in-law of the current militant leader in the region, was jailed in 2002. He was shifted to a hospital in the northwestern city of Peshawar five months ago because of poor health.

Ajmal Khan, the deputy superintendent of Peshawar's main jail, said the government "issued an order for the release of Sufi Mohammad, and I have conveyed this order to him."

Shortly after, Muhammad left the hospital under police escort, accompanied by followers wearing black turbans, said Zafar Khan, a paramedic at the hospital.

Muhammad founded the Tehrik Nifaz-e-Sharia Mohammed — or Movement for the Enforcement of Islamic Law — which sent thousands of volunteers to fight in Afghanistan against the U.S.-led invasion that toppled the Taliban regime in 2001.

Supporters of his son-in-law, Maulana Fazlullah, took control of much of the Swat Valley last year until Pakistan's army won it back in a bloody military operation.

The group wants a Taliban-like system in Pakistan, including compulsory beards for men, mandatory veils for women and the outlawing of light entertainment including music and television.

President Pervez Musharraf outlawed the group in early 2002, and Muhammad was arrested when he returned to Pakistan after fighting in Afghanistan.

He was sentenced in November 2002 to three years in prison on a weapons charge but has since remained in custody.

Army spokesman Maj. Gen. Athar Abbas said the military was not involved in the government's decision to release Muhammad.

He said 90 percent of the valley was peaceful, but the army was still conducting occasional search operations against militant holdouts and had recently set up a checkpoint at Fazlullah's former headquarters to stop followers from slipping back into the area.

No decision has been made to withdraw the army, Abbas said.