WASHINGTON — The terrorist threat to Americans is greater overseas than at home and is significantly lower than before the Sept. 11, 2001, attacks, continuing a years-long trend, U.S. officials told a Senate committee Thursday.

FBI Director James B. Comey, in his first testimony before Congress since his Senate confirmation in July, said he worries about homegrown extremists who operate independent of traditional terrorist groups, however.

“Because we took the fight to the enemy and got our act together in the last 12 years in very, very important ways, the risk of that spectacular attack in the homeland is significantly lower than it was before 9/11,” Comey told the Senate Homeland Security Committee.

He said “what's popped up in its place” is the risk of smaller attacks by so-called lone wolves.

“You've got the hydra head less able to attack us in the homeland,” he said. “So it's pushed more overseas and gotten smaller and more disparate in the homeland.”

U.S. counter-terrorism operations have disrupted the core Al Qaeda leadership in northwestern Pakistan, but its affiliates “have blossomed and flourished in places around the world, especially in the Middle East and North Africa,” Comey said.

Rand Beers, the acting secretary of Homeland Security, said it appeared those groups would focus their operations on targets overseas, not in the United States.

“The dispersion of the Al Qaeda brand in North Africa, in Yemen, in Somalia and in other places -- and as it is appearing to manifest in Syria now -- means that the kinds of activities that will be undertaken are likely to be undertaken overseas, rather than directed against the homeland,” Beers said.

Matthew Olsen, director of the National Counterterrorism Center, said U.S. and Russian intelligence agencies have improved cooperation since the Boston Marathon bombings April 15. Two self-radicalized Russian immigrant brothers are suspected in the attack; one was slain in a shootout.

Olsen said both countries “face a common threat of violent extremists.”

Olsen said he visited Sochi, Russia, last week to discuss security preparations for the 2014 Winter Olympics. Thousands of visitors are expected to attend the Games in February.

“I would point to the last several months as a -- as a period of increasing cooperation,” Olsen said.