ByDeb Riechmann, Associated PressJune 16, 2016

CIA Director John Brennan testifies on Capitol Hill in Washington, Thursday, June 16, 2016, before the Senate Intelligence Committee hearing on the Islamic State. Brennan said that the Islamic State remains "formidable" and "resilient," is training and attempting to deploy operatives for further attacks on the West and will rely more on guerrilla-style tactics to compensate for its territorial losses in the Middle East.

Washington — The U.S. battle against the Islamic State has not yet curbed the group's global reach and as pressure mounts on the extremists in Iraq and Syria, they are expected to plot more attacks on the West and incite violence by lone wolves, CIA Director John Brennan told Congress on Thursday.

In a rare open hearing, Brennan gave the Senate intelligence committee an update on the threat from Islamic extremists and shared his views on a myriad of other topics, including encryption, Russia and Syria.

Brennan said IS has worked to build an apparatus to direct and inspire attacks against its foreign enemies, as in the recent attacks in Paris and Brussels — ones the CIA believes were directed by the top IS leaders.

"Furthermore, as we have seen in Orlando, San Bernardino and elsewhere, ISIL is attempting to inspire attacks by sympathizers who have no direct links to the group."

Brennan said the CIA has not been able to uncover any direct link between the Orlando shooter and a foreign terrorist organization.

He said the U.S.-led coalition has killed IS leaders, forced the group to surrender large swaths of territory in Iraq and Syria and that fewer fighters are traveling to Syria and others have defected.

While the group's ability to raise money has been thwarted, it still generates at least tens of millions of dollars every month, mostly from taxation and sales of crude oil on black markets in Syria and Iraq.

"Unfortunately, despite all our progress against ISIL on the battlefield and in the financial realm, our efforts have not reduced the group's terrorism capability and global reach," he said.

He said IS is slowly cultivating its branches into an interconnected global network and that the number of IS fighters now far exceeds what al-Qaida had at its peak.

The CIA estimates there are 18,000 to 22,000 IS fighters in Syria and Iraq — down from about 33,000 last year. The branch in Libya, with between 5,000 and 8,000 fighters, is the most advanced and most dangerous, but IS is trying to increase its influence in Africa, Brennan said.

He said Boko Haram is now the IS branch in West Africa and has several thousand fighters. Brennan described the IS branch in the Sinai as the most active and capable terrorist group in Egypt, attacking Egyptian military and government targets as well as foreigners and tourists, such as in the downing of a Russian passenger jet last October.

The Yemen branch, with several hundred fighters, has been riven with factionalism. And the Afghanistan-Pakistan branch, also with hundreds of fighters, has struggled to maintain its cohesion, in part because of competition with the Taliban, he said.

The issue of encryption arose several times during the nearly two-hour hearing.

Law enforcement officials say data encryption is making it harder to hunt for terror suspects and intercept their messages. They say they need access to encrypted communications and that tech companies should maintain the ability to unlock the data from their customers.

They face fierce opposition from Silicon Valley companies that say encryption safeguards their customers' privacy rights and protects them from hackers, corporate spies and other breaches.

Lawmakers have weighed in on both sides of the dispute and are working to find the appropriate role for government in an area where the private sector operates the internet.

Committee chairman Sen. Richard Burr, R-N.C., said the "feud between the tech companies and the intelligence community and law enforcement has to stop."

Sen. Ron Wyden, D-Ore., said that requiring companies to build back doors into their products to weaken strong encryption will put the personal safety of Americans at risk. "I want to make it clear I will fight such a policy with everything I have," Wyden said.

In the House, wary lawmakers on Thursday rejected a measure that would have prohibited the U.S. government from searching the online communications of Americans without a warrant. The vote came days after the mass shooting in Florida. Opponents of the amendment to the annual defense spending bill said the measure would have blocked investigators from searching lawfully collected information to determine whether the Orlando gunman had contacted terrorists overseas.

The CIA chief embraced a bill that seeks to set up a commission to bring together intelligence, law enforcement and the business and tech communities to work on the issue.

Brennan also expressed his views on other issues:

RUSSIA

Brennan said Russian military forces have bolstered Syrian President Bashar al-Assad and are carrying out attacks against the U.S.-backed forces trying to unseat him. He said Assad is in a stronger position now than he was in June 2015 and that the agreed cessation of violence is "holding by a thread."

TORTURE

Brennan said individuals within the CIA have been held accountable for problems in the agency's former detention and interrogation program set up after Sept. 11. He said he could elaborate in a classified setting.

TWITTER

Brennan confirmed a May report in The Wall Street Journal that the data mining company, Dataminr Inc., had ended its contract with the CIA.

The New York-based company, which monitors information streaming across Twitter and sends alerts to clients, continues to provide data to Russia Today, a television network backed by the Russian government.