The former commander said that he was supported by the Pakistani military for 15 years as a fighter, leader and trainer of insurgents until he quit a few years ago. Well known in militant circles but accustomed to a covert existence, he gave an interview to The New York Times on the condition that his name, location and other personal details not be revealed.

Militant groups, like Lashkar-e-Taiba, Harakat-ul-Mujahedeen and Hizbul Mujahedeen, are run by religious leaders, with the Pakistani military providing training, strategic planning and protection. That system was still functioning, he said.

The former commander’s account belies years of assurances by Pakistan to American officials since the Sept. 11, 2001, attacks that it has ceased supporting militant groups in its territory. The United States has given Pakistan more than $20 billion in aid over the past decade for its help with counterterrorism operations. Still, the former commander said, Pakistan’s military and intelligence establishment has not abandoned its policy of supporting the militant groups as tools in Pakistan’s dispute with India over the border territory of Kashmir and in Afghanistan to drive out American and NATO forces.

“There are two bodies running these affairs: mullahs and retired generals,” he said. He named a number of former military officials involved in the program, including former chiefs of the intelligence service and other former generals. “These people have a very big role still,” he said.