ISLAMABAD, PAKISTAN
— Pakistan's military and intelligence agencies are hard at work trying to change their image as unfaithful friends of the US.

The capture of 442 Al Qaeda terror suspects - including the March 1 arrest of top Al Qaeda lieutenant Khalid Sheik Mohammed - has given Pakistan's secretive Inter-Services Intelligence agency (ISI) a lot to crow about. And the US has been quick with its public praise.

"The cooperation is good, and we have no indication that the Pakistanis are holding back in hunting Al Qaeda," says a Western diplomat based in Islamabad.

Yet US military officials in neighboring Afghanistan privately grumble that Pakistan remains a haven for Al Qaeda. And some Pakistani law-enforcement agents here say that numerous raids on Al Qaeda hideouts in the past year have been compromised by police or intelligence agents tipping off Al Qaeda to flee in advance - the type of leaks that could ultimately hinder the capture of Osama bin Laden.

This ambivalence is a sign that Pakistan will have to do a lot more before it can erase a long history of supporting extremist groups and prove itself a trustworthy ally in the US war on terror.

"I have no doubt that there may be individuals in ISI who are sympathetic to Al Qaeda, who are helping these extremists, giving them safe haven," says one former ISI agent, speaking on condition of anonymity. "These movements have mushroomed in Pakistan, and we need to do a thorough house-cleaning to get rid of these rascals."

To be sure, upon taking office in a 1999 coup, President Pervez Musharraf fired several high-ranking ISI officials.

But the continued level of interaction between the ISI and extremists has become clear through the police investigation of the murder of Wall Street Journal reporter Daniel Pearl. The man arrested and convicted of being the mastermind of Mr. Pearl's kidnapping last January, Omar Sheikh Sayeed, was a member of Jaish-e Muhammed, an extremist group that trained in Afghanistan, fought in Afghanistan and the disputed territory of Kashmir, and was blamed for the attack on India's Parliament building on Dec. 2001, which left 13 dead. Police investigators say they have attempted to continue with the Pearl case, but have been obstructed by ISI.

For example, Pakistani prosecutors say Mr. Sayeed was arrested on May 12, 2002, when he handed himself over to police in Lahore. But Sayeed's uncle, a sitting Pakistani court justice, testified at Sayeed's trial that he had escorted his nephew to top police officials in Lahore a week before that, on May 5. Some Pakistani police investigators say Sayeed was in ISI custody during that week, giving time to other extremists to flee.

"You get hold of these extremists, and the bottom line comes to ISI," one police investigator in Karachi told the Monitor, privately. "They all have links to ISI."

Even with this checkered past, US intelligence agents have worked closely with Pakistani intelligence counterparts in the hunt for Al Qaeda. According to ISI officials at a remarkable press conference Monday night - the first ever briefing for foreign reporters - ISI officials gave details of their cooperation with US intelligence agencies.

FBI technicians, for instance, have used sophisticated wire-tapping equipment to trace top Al Qaeda suspects. ISI agents used this FBI information to conduct raids. Despite this close coordination, Pakistani officials have hotly denied that US agents were present during the raids on Al Qaeda hideouts, in part because of the intense public fears that Pakistan is losing its sovereignty to American interests.

In addition to revealing evidence that Mr. bin Laden is probably still alive, ISI officials admitted that Pakistan's ties to extremist groups lingered for some time after Mr. Musharraf's announcement of full support for America's war on Al Qaeda.

"Religious, ethnic, and institutional ties between the Taliban and Pakistan in the majority mind-set militated against any quick divorce," said the head of ISI's counterterrorism cell, who like other ISI officials refused to give his name. As such, the official said, Pakistan began a "phased program to curb extremism." Pakistan says it began this program in the spring of 2001, months before the Sept. 11 attacks.

"We feel that we have not been getting our dues," one ISI official told journalists. "Instead, we have been getting flak, particularly from the Western media. We hope this meeting will clear [things] up."

Pakistani observers say it will take more than a good housecleaning, however. Two decades of support for radical Islamist movements have filled up the Pakistani military and the ISI with likeminded soldiers, many of whom are just now reaching positions of rank and power. State support for militant Islamist causes have increased the power of radical Islamic parties, which managed to win unprecedented control of two crucial states along the Afghan- Pakistani border.

The fact that Mr. Mohammed was arrested in the home of an activist of Jamaat-i Islami, the nation's largest religious party, has led some Pakistanis to believe that Al Qaeda fugitives are receiving help from high levels.

It is this new Islamist nexus in the Northwest Frontier Province and Baluchistan that some analysts say could keep radical Islamist causes alive, and could provide a haven for Al Qaeda and Taliban fugitives, including bin Laden. It could also provide political cover for individual ISI agents who have Al Qaeda sympathies.

"I don't think we have two ISI's, one that's pro-Musharraf and one that's pro-Al Qaeda," says Afzal Naizi, columnist for the Nation, a leading Pakistani newspaper. "I think we have lots of little fragments, each of which has its own agenda. You don't know if the guy is on the right side or not."