LAHORE, Pakistan  Secretary of State Hillary Rodham Clinton, on a visit meant to improve relations with Pakistan, strongly suggested Thursday that some Pakistani officials bore responsibility for allowing terrorists from Al Qaeda to operate from safe havens along this country’s frontier.

“I find it hard to believe that nobody in your government knows where they are, and couldn’t get to them if they really wanted to,” she said to a group of Pakistani journalists on her second day here. “Maybe that’s the case; maybe they’re not gettable. I don’t know.”

It is extremely rare for an official of Mrs. Clinton’s rank to say publicly what American politicians and intelligence officials have said in more guarded ways for years. The remarks upset her hosts, who have seen hundreds of soldiers and civilians killed as Pakistan has taken on a widening campaign against militant groups that have threatened the country from its tribal areas.

But her skeptical comments also gave voice to the longtime frustration of American officials with what they see as the Pakistani government’s lack of resolve in rooting out not only Al Qaeda, but also the Taliban leadership based in Quetta, and a host of militant groups that use the border region to stage attacks on American and NATO forces in Afghanistan.