Secretary of State Hillary Rodham Clinton confirmed Friday that U.S. officials have met secretly with members of the Pakistan-based Haqqani militant group, a disclosure that came as the top U.S. diplomat pressed Pakistani leaders to do more to rein in terrorists operating inside their country’s borders.

The meeting last summer with Haqqani leaders was arranged by Pakistan’s intelligence agency and was intended to gauge whether the notoriously violent Haqqanis could be enticed to join peace talks aimed at ending the decade-old insurgency in Afghanistan, State Department officials said.

Clinton cited the secret talks while urging Pakistan to pressure members of the Taliban and Haqqani networks into quitting violence and participating in an Afghan-led “reconciliation” process. But she also warned Pakistanis to step up the fight against insurgents who refuse to make peace, saying, “You cannot let these terrorists get a foothold anywhere, because they are uncontrollable and they create consequences.”

“If they kill a bunch of people and the signature is somebody in Pakistan did it, it’s going to be very hard to control that reaction,” Clinton told a panel of Pakistani journalists in Islamabad. “We are not making this up, we are not scapegoating, we are not blaming. We are trying to convey a sense of urgency about what could happen inside your own country.”

Clinton made the comments near the end of a two-day visit in which she mixed tough talk with offers of assistance and encouragement. After three rounds of meetings with Pakistani leaders, Clinton said the two countries had “cleared the air” and reinforced broad agreement on priorities for improving security.

But she also acknowledged lingering difficulties and said details of a plan for better cooperation on counterterrorism had yet to be worked out.

“We had very frank, very open exchanges, and we have heard each other,” Clinton said shortly after meeting with Pakistani President Asif Ali Zardari. “That doesn’t mean that the path forward is easy.”

Clinton’s fourth visit to Pakistan as secretary of state came at a low point in a frequently volatile relationship. Pakistanis were deeply angered by the U.S. military raid in May that killed al-Qaeda leader Osama bin Laden, and U.S. officials have repeatedly accused Pakistan of providing sanctuary for the Haqqanis and other extremist groups that stage attacks on U.S. and Afghan troops across the border in Afghanistan.

With the scheduled departure of combat forces from Afghanistan just three years away, the Obama administration is pressing Pakistan to do more to stop insurgent and terrorist attacks emanating from the Pakistani side of the border. Clinton, who was accompanied by a high-level entourage that included CIA Director David H. Petraeus and Gen. Martin Dempsey, the new chairman of the Joint Chiefs of Staff, warned Pakistani officials at the start of the visit that the United States was prepared to act unilaterally if Pakistan did not clear out Haqqani havens in its territory.

On Friday, she repeated the warning, saying there was no such thing as “good terrorists and bad terrorists.”

“You can’t keep snakes in the back yard and expect them to bite only your neighbors,” Clinton told reporters at the news conference with the Pakistani foreign minister, Hina Rabbani Khar.

Khar, standing at a podium next to Clinton, insisted that her government had “acted against the threat inside our borders.”

“There is no question of any support by any Pakistani institutions for safe havens in Pakistan. Let me say that unequivocally,” Khar said.

At a series of public events and interviews Friday, Clinton heard from ordinary Pakistanis about what some called the widening “trust deficit” between the two countries. At a town-hall meeting with business professionals, Clinton was asked why the United States seemed to perpetually play the role of nagging in-law with Pakistan.

“You’re like a mother-in law just not satisfied with us,” one woman told Clinton, referring to U.S. relations with Pakistan. “We’re trying to please you, but every time you come to visit, you tell us to do something different.”

Clinton was also queried sharply about continuing U.S. drone attacks on terrorist targets inside Pakistan and why Washington had not informed Pakistan before conducting a commando raid against bin Laden a few miles from one of Pakistan’s premier military academies.

“We considered this to be such an important operation we did not share the information even within our own government,” Clinton told the journalists’ roundtable.

The confirmation of the secret Haqqani meeting in late August came during one such exchange. Word of the meeting leaked shortly afterward, but the Obama administration had never publicly acknowledged that it took place.

Clinton said U.S. officials agreed to meet with the Haqqanis to “test their sincerity,” but she added, “We have not had any kind of negotiations.”

“We had one preliminary meeting, to see if anyone would show up,” she said.

A senior U.S. official later said that the meeting had been arranged at the request of Pakistan’s intelligence service. The official, who spoke on the condition of anonymity to candidly discuss sensitive issues, declined to describe the outcome but noted that two of the boldest Haqqani attacks on U.S. targets — including last month’s assault on the U.S. Embassy in Kabul — took place in the weeks after the event.

Senior Pakistani military officials said in interviews that Pakistan had arranged the meeting at the request of U.S. officials.

Clinton pressed Pakistani leaders during her meetings to encourage militant groups to take part in reconciliation talks, though she acknowledged that it was far from certain that the Taliban and its allies would participate in good faith.

“We are trying to put together a process that could sequence us toward negotiations,” Clinton said. “We don’t know whether this will work, but we believe strongly that we must try it.”

The administration has held at least two meetings this year with the Afghan Taliban.

Pakistani officials pledged that they would also support such talks. “We must explore and give peace a chance on both sides of the border,” Khar said.

Staff writer Karen DeYoung in Washington contributed to this report.