KARACHI - Pakistani police have arrested a former Air Force pilot who later donated funds to the Taliban and Al Qaeda, police told Reuters on Wednesday, in a rare case targeting those who financially contribute to militancy.

The suspect, Syed Sheaba Ahmed, was detained in Karachi. He paid for the treatment of injured Taliban militants at a hospital in Lahore, police said.

He also influenced two militants involved in an attack on a busload of minority Shi'ite Ismaili Muslims in May that killed 45 people, senior police officer Naveed Khawaja from the provincial Counter Terrorism Department told journalists.

READ MORE: The true north

He will be charged with terror financing, said Khawaja.

"Ahmed has also been financing Afghan Taliban, we are still in the process of ascertaining if he has been providing financing through his businesses or someone else is behind him," the officer said.

"Ahmed was also providing financial assistance to AQIS," Khawaja said, referring to Al Qaeda in the Indian Subcontinent, a branch of Al Qaeda that was founded a year ago.

The arrest is a rare success for Pakistan's police force, struggling with militancy and corruption as well as crime. After Taliban gunmen massacred around 150 people, mostly children, at an army-run school in December, the government vowed to crack down on militancy. Attacks have fallen sharply as the military has also pushed further into the lawless tribal regions bordering Afghanistan.

But militant groups remain a threat, and many have followers in Pakistan's cities, which fall under the control of the chronically under-trained and under-funded police force.

Ahmed, 52, used to give sermons at a mosque in Karachi's upscale Defence Housing Authority neighbourhood.

His public sermons were moderate, but privately he encouraged radicalism, police said.

He previously studied at the Pakistan Air Force College in Sargodha city, and left the Air Force in 1998, another security official told Reuters on condition of anonymity. He later went into the paint and chemicals business.

Meanwhile a Counter Terrorism Department (CTD) statement said Ahmed, whose name was disclosed by Safoora Carnage accused during interrogation, confessed to his association with Tanzeem-e-Islami.

The press release further said that Ahmed runs chemical business in Pakistan as well as in neighbouring Islamic countries, adding he uses the revenue proceeds from abroad to finance terrorists in Pakistan.

"Sheeba Ahmed not only prepared Safoora attackers mentally but also extended complete financial support to them to execute the Ismaili community carnage", CTD claimed.

CTD further added that an accused arrested from Lahore, identified as Hasan Ghazali, had revealed that Sheeba provided financial support to a hospital in Lahore for extending medical aid to injured terrorists.