The FBI's new director says he supports the government's electronic surveillance program as a useful, "legal" tool, even though he opposed eavesdropping activities under ex-US president George W Bush.

Two weeks after taking over at the Federal Bureau of Investigation, James Comey
said in an interview with AFP and several other news outlets that US President Barack Obama's controversial spying policies were needed to counter a "metastasizing" threat from al-Qaeda.

The former federal prosecutor and Republican, who towers at six feet eight inches (two meters) tall, comes to the job amid a firestorm over far-reaching surveillance by the National Security Agency (NSA) and concerns over privacy rights, following dramatic leaks by former intelligence contractor Edward Snowden.

"It is both a useful tool and a tool that is circumscribed by all kinds of checks and balances," Comey said.

"Its challenge is to find a space in the American public life to talk about how those things work."

He called for public discussion to address the role of the Foreign Intelligence Surveillance Court, which reviews the spying, and "all the fences that are around this, why this is lawful and appropriate" under the US Constitution.

During his time in the Justice Department under the Bush administration, Comey clashed with the White House in a now famous showdown over the legality of a domestic eavesdropping program.

According to Comey's account to lawmakers and The New York Times, White House officials tried to persuade the then attorney general, John Ashcroft, to approve the program while he was ill and undergoing treatment in a hospital, even though he had already decided to reject it.

Comey got word and raced to the hospital, and managed to prevent White House officials from pressuring the attorney general into approval.

The program, created in the wake of the attacks of September 11, 2001, authorised the NSA to eavesdrop – without a court warrant – on telephone and online communications outside America even if the other end of the communication was located inside the United States.

The program was suspended in 2007 after a public outcry and oversight by the surveillance court was restored. Revelations from Snowden have shown the NSA has since overstepped its authority for domestic spying in numerous cases, but the agency insists those were unintentional mistakes.

"I'm comfortable with it," Comey said.

"It's important to find the right balance when the government needs to collect information when it's lawful and appropriate, with public concern about privacy."

It was vital to have a public debate on the issue, said Comey, adding "I think that's healthy."

He predicted the issue will inevitably makes its way to the Supreme Court, but Comey said he believes the surveillance and data collection does not violate the privacy rights enshrined in the Constitution's Fourth Amendment.

Comey said recent moves to declassify NSA documents on data collection were useful as "people can actually see" and understand what the government is doing.

But, agreeing with statements from US intelligence chief James Clapper, he said there was also the danger that it could cause extremists to change the way they communicate.

"I share those concerns, it's a very big deal," he said.

Sitting in the office of his predecessor Robert Mueller, who served for 12 years as head of the vast law enforcement agency, Comey said without a doubt his "top priority" was tackling terrorist threats.

"I wake up every morning with it. I go to bed at night with it," he said, adding that he would continue Mueller's work transforming the bureau into an "intelligence" agency to detect terror plots.

Not long after starting as director, Comey was in the spotlight as his agency carries out an investigation into Monday's shooting rampage at the Navy Yard in the heart of Washington, which left 13 dead.

Gunman Aaron Alexis, a former Navy sailor turned defense contractor, died in an exchange of fire with police and so far authorities have found no link to terrorism or extremist groups.

Comey said with the core al-Qaeda leadership weakened in Pakistan, the threat posed by the network had evolved.

Affiliate groups are cropping up around the world, while homegrown extremists feeding off propaganda online are a growing threat inside the United States.

"What I see is a metastasizing threat," he said, calling "self-radicalized lonewolves" an increasing menace.