The United States is bracing for possible Libyan-backed terrorist attacks, President Barack Obama's top counterterrorism official said Friday.

The official, John O. Brennan, said that the military attacks on civilians ordered in recent days by Libya's leader, Moammar Gadhafi, coupled with his track record as a sponsor of terrorism, had heightened worries within the administration as an international coalition threatens military action against Libya.

Asked if U.S. officials feared that Gadhafi could open a new terrorism front, Brennan said: "Gadhafi has the penchant to do things of a very concerning nature. We have to anticipate and be prepared for things he might try to do to flout the will of the international community."

Among the threats the United States is focusing on is Libya's stockpile of deadly mustard gas, he said.

Brennan spoke to reporters after addressing the Brennan Center for Justice at New York University Law School in Manhattan. The center is named for Supreme Court Justice William J. Brennan Jr., who died in 1997 and was no relation to Brennan.

After renouncing its nascent nuclear weapons program in 2003 and enjoying a brief interlude as Washington's partner in combating al-Qaida's branch in North Africa, Libya has reverted to its status as a pariah government whose intelligence operatives blew up Pan Am Flight 103 above Scotland in 1988.

Brennan acknowledged that the political turmoil in the Middle East in the past three months had breached or weakened counterterrorism cooperation among some Arab countries. But he added that the United States had taken unspecified steps in recent months to offset its losses in that area. Among those steps may be more electronic eavesdropping, spy satellite coverage and more informants on the ground, independent intelligence specialists said.

"We've been able to weather some of these storms, but clearly there have been effects," he said. "We need to work hard to ensure that the cooperation that existed before with certain countries continues."

Brennan declined to provide details of what the United States was doing or which countries it was focusing on, but it is no secret that U.S. spy agencies have worked closely with counterparts in countries like Egypt, Tunisia and Yemen.

"When politics change, frequently security and intelligence services that are dedicated to thwarting transnational terrorist groups, they remain largely unaffected because their focus is on those elements that are trying to undermine the security and stability of the country," Brennan said.

He said U.S. spy services and law enforcement agencies had worked with some Arab counterparts in recent weeks to disrupt terrorist plots that allied officials had been tracking even before the political tumult in the region boiled over. He said a number of jailed terrorism suspects or sympathizers in those countries who had been released or escaped in the recent chaos had been "rounded up and brought back."

But not all. Egypt's governing military council released the younger brother of Ayman al-Zawahri, al-Qaida's second in command, from prison Thursday after holding him for a decade on charges of conspiracy to overthrow the government.

Asked about the release of this prominent prisoner, Brennan barely disguised his frustration with Egyptian military officials.

"I'm concerned if any individual who is involved in terrorism is released either intentionally or as a result of the lack of security," he said.

Any terrorism threat from Gadhafi would join a regional roster that includes affiliates of al-Qaida in Yemen and North Africa, which may seek to carve out a safe haven in Libya's south.