Russian military intervention in Syria has turned the course of that country’s civil war against U.S.-backed rebel groups, increasing the likelihood that Syrian President Bashar al-Assad and his loyalists will remain in power, U.S. intelligence officials testified Tuesday.

The assessment amounts to an acknowledgment by U.S. spy agencies that Russian airstrikes have derailed the Obama administration’s aims of pushing Assad aside as part of a political settlement to the nearly five-year old conflict.

“The Russian reinforcement has changed the calculus completely,” Lt. Gen. Vincent R. Stewart, head of the Defense Intelligence Agency, said in Senate testimony. Assad is “in a much stronger negotiating position than he was just six months ago,” Stewart said. “I’m more inclined to believe that he is a player on the stage longer term than he was six months to a year ago.”

As recently as last summer, U.S. intelligence officials were openly talking about an “endgame” for the Syrian leader, who is also supported by Iran.

[U.S. struggles to secure Syrian cease-fire as humanitarian crisis mounts]

Stewart’s remarks came during a pair of Senate hearings on Tuesday that served as a grim survey of the security problems — including cyberattacks, terror threats and failing states — that seem certain to confront the next occupant of the White House.

Among those testifying were Director of National Intelligence James R. Clapper Jr., FBI Director James B. Comey and CIA Director John Brennan, who was making his first public appearance before the Senate Intelligence Committee since the panel issued a scathing 2014 report on the agency’s use of brutal interrogation methods on terrorism suspects.

The lingering tensions behind that Senate probe erupted during a heated exchange Tuesday between Brennan and Sen. Ron Wyden (D-Ore.), who demanded an admission from the CIA chief that his staff had improperly accessed files of Senate investigators combing through agency records.

As Wyden made his case, Brennan bristled, saying, “This is the annual threat assessment, is it not.”

Brennan seemed to be chiding Wyden for raising the computer intrusion issue during a hearing that is annually devoted to examining security threats. But the confrontation only continued, with both men raising their voices.

Ultimately, Brennan admitted “very limited inappropriate actions” by CIA staff but accused Senate investigators of comparable transgressions and came close to shouting at Wyden: “Do not say that we spied on Senate computers or your files! Do not say that!”

Clapper led his testimony with warnings about the nation’s vulnerability to cyberattacks from Russia, China and other adversaries — putting computer-based intrusions at the top of his security-risk list as he has done in recent years.

But Clapper also cited the spread of the Islamic State beyond its base in Syria, recent signals that North Korea remains determined to develop a nuclear weapon capable of striking the United States, and the rising danger that “home-grown” terrorists might launch plots inspired by attacks last year.

“The perceived success” of the attacks in Paris, Chattanooga, Tenn., and San Bernardino, Calif., “might motivate others to replicate opportunistic attacks with little or no warning, diminishing our ability to detect terrorist operational planning and readiness,” Clapper said in testimony submitted to the Senate Intelligence and Armed Services committees.

Despite nearly 15 years of U.S. counterterrorism operations after the Sept. 11 attacks, Clapper said, “there are now more Sunni violent extremist groups, members and safe havens than at any time in history.”

At one point, Clapper described his grim presentation, only half jokingly, as a “litany of doom.”

Clapper’s testimony on Syria came as thousands of civilians have fled that country’s largest city, Aleppo, amid a barrage of Russian airstrikes and advances by regime forces aimed at dislodging rebel factions that had maintained control of much of the city since 2012.

The Russian-backed advances in recent weeks coincided with the collapse of peace talks in Geneva, once seen as key to the Obama administration’s efforts to engineer Assad’s departure as part of a negotiated end to the civil war.

Obama had said that he was “confident that Assad’s days are numbered” during the last presidential election cycle four years ago. The United States has also carried out hundreds of airstrikes, and trained and armed thousands of rebel fighters, in pursuit of that elusive outcome.

Instead, many experts now see moderate groups in Syria as pinned between two more powerful forces: Assad and the Islamic State.

U.S. officials said the terror group continues to draw substantial support from beyond Syria despite territorial setbacks in recent months. The number of foreign fighters who have gone to Syria since the conflict started has surged to 36,500, up from estimates of 20,000 a year ago.

At least 6,600 of those fighters have migrated to Syria from Western nations, Clapper said, compared with 3,400 a year earlier. The Paris attacks, which involved militants who had fought in Syria, were widely regarded as a chilling demonstration of the foreign fighter threat in Europe.

Islamic State-related arrests in the United States surged to 60 in 2015, five times the number a year earlier.

Beyond its military involvement in Syria, Russia has also emerged as an increasingly aggressive adversary of the United States online, Clapper said.

“Russia is assuming a more assertive cyber posture,” Clapper said, adding that Moscow is increasingly willing “to target critical infrastructure systems and conduct espionage operations even when detected and under increased public scrutiny.”

Just days after North Korea launched a satellite into space — a move widely seen as a test of its long-range missile capability — Brennan said that Pyongyang was seeking not only to demonstrate its capability but “showcase” its technology for potential buyers of its missiles and weapons systems.

U.S. officials also said they have seen no indication that Iran is violating any aspect of a multinational agreement reached last year to dismantle aspects of its nuclear program in return for relief from economic sanctions.