James R. Clapper Jr., director of national intelligence, testified last month during a meeting of the Senate Armed Services Committee. (Evy Mages/Getty Images)

U.S. counterterrorism officials and experts, never known for their sunny dispositions, have entered a period of particular gloom.

In congressional testimony recently, Director of National Intelligence James R. Clapper Jr. went beyond the usual litany of threats to say that terrorism trend lines were worse “than at any other point in history.”

Maj. Gen. Michael Nagata, commander of U.S. Special Operations forces in the Middle East, told participants on a counter­terrorism strategy call that he regarded the Islamic State as a greater menace than al-Qaeda ever was.

Speaking at a New York police terrorism conference, Michael Morell, former deputy director of the CIA, said he had come to doubt that he would live to see the end of al-Qaeda and its spawn. “This is long term,” he said. “My children’s generation and my grandchildren’s generation will still be fighting this fight.”

The assessments reflect a pessimism that has descended on the U.S. counterterrorism community over the past year amid a series of discouraging developments. Among them are the growth of the Islamic State, the ongoing influx of foreign fighters into Syria, the collapse of the U.S.-backed government in Yemen and the downward spiral of Libya’s security situation. The latest complication came Saturday, when the terrorist group Boko Haram in Nigeria carried out a series of suicide bombings and reportedly declared its allegiance to the Islamic State.

Map: Flow of foreign fighters to Syria

[Nigeria’s Boko Haram pledges allegiance to Islamic State]

Unlike the waves of anxiety that accompanied the emergence of new terrorist plots over the past decade, the latest shift in mood seems more deep-seated. U.S. officials depict a bewildering landscape in which al-Qaeda and the brand of Islamist militancy it inspired have not only survived 14 years of intense counterterrorism operations but have also spread.

Officials emphasize that their campaign has accomplished critical goals. In particular, most officials and experts now see the risk of a Sept. 11-scale attack as infinitesimal, beyond the reach of al-Qaeda and its scattered affiliates.

Still, the adjusted outlook contrasts sharply with the surge of optimism that followed the killing of Osama bin Laden in 2011 and the dawn of the Arab Spring, which was initially seen as a political awakening across the Middle East that might render al-Qaeda and its archaic ideology irrelevant.

Within months of bin Laden’s death, then-Defense Secretary Leon E. Panetta said he was convinced “that we’re within reach of strategically defeating al-Qaeda.” President Obama echoed that view in subsequent years by saying that al-Qaeda was on “a path to defeat” and, more recently, that the then-nascent Islamic State was analogous to a junior varsity sports team.

Such upbeat characterizations have all but evaporated.

By its nature, counterterrorism work is an enterprise that induces pessimism, one that is focused on fending off catastrophe and involves dwelling on worst-case scenarios. There are prominent dissenting voices who argue that the level of alarm now is out of proportion to the threat — as misplaced as the spike in confidence that preceded it.

Their case hinges on the degraded capabilities of al-Qaeda and the limited agenda of the Islamic State, which has been far more focused on securing territory in the Middle East than launching transnational plots.

“There are people who are alarmed and bewildered. There are also a lot of experts who don’t think this is the end of the world,” said Daniel Benjamin, a Dartmouth College professor who formerly served as the top counter­terrorism official at the State Department. “More people have thrown in their lot with the extremists than has been the case before. But the numbers are relatively small, and our own security is much less imperiled than has been claimed.”

Paul Pillar, the former deputy director of the CIA’s Counterterrorism Center, argued in articles last year that concern over Syria and Iraq had reached a state of panic that had more to do with the psychological scars of 9/11 and the wars that followed than any truly existential danger.

“Everyone should take a deep breath,” Pillar wrote.

Still, other veteran analysts known for their equanimity sound increasingly grim. Even if the near-term prospect of a major attack in the United States or Europe is slim, they argue, elements of risk are accumulating rapidly.

“You’ve got a much bigger counterterrorism problem than you had a few years ago,” said John McLaughlin, a former deputy director of the CIA. Terrorist groups “have never had territory of this magnitude. Never had this much money. Never this much access to Western passport holders. Never had the narrative they have now.”

In this case, “narrative” is a broad term for the appeal of the Islamic State. The group, which broke off from al-Qaeda, has exploited the civil war in Syria to amass territory and declare itself a new caliphate. At the same time, its battlefield success and abundant presence on social media have helped it challenge if not eclipse al-Qaeda as a brand.

Even months of U.S.-led airstrikes have failed to diminish the flow of fighters into Syria. Clapper testified last month that more than 20,000 foreign fighters have entered Syria, including at least 3,400 from the West — “a pool of operatives who potentially have access to the United States.”

Many counterterrorism officials are equally worried about those who embrace the Islamic State’s ideology without leaving for the war. Attacks in Boston, Paris and elsewhere in recent years underscore the extraordinary difficulty of detecting plots with no active links to groups overseas.

Some also see significant cause for continued concern about al-Qaeda, even in its diminished state. A decade of drone strikes has depleted its upper ranks and deprived it of the resources and space that most experts believe are needed for it to orchestrate the sort of sophisticated, multi-stage, mass-casualty attack that was its signature. But smaller-bore plots may still be within reach.

At the New York terrorism conference, Morell said that while “no terrorist group currently has the capability to conduct a 9/11-style attack,” there are at least three al-Qaeda nodes that could stage attacks that could kill hundreds of people. Among them are al-Qaeda’s core in Pakistan, the group’s affiliate in Yemen and a more recently formed satellite in Syria known as the Khorasan Group.

“I would not be surprised if one of these groups were able to bring down an airliner in the U.S. tomorrow,” Morell said, emphasizing that the terrorist entity that has drawn the most attention — the Islamic State — “is not one of these groups.”

Al-Qaeda’s franchise in Yemen is still seen as the group’s most dangerous affiliate. The danger had seemed increasingly dormant, but the recent overthrow of the Yemeni government forced the CIA to withdraw many of its operatives and derailed a counterterrorism partnership that Obama had described as a model.

In congressional testimony last month, Clapper ranked terrorism third on his list of security concerns — behind cyberthreats and counterintelligence — although he indicated that the order could change if the Islamic State turned its focus against the United States.

At one point, Clapper was asked whether he stood by his assertion that the country was beset by more crises and threats that at any other time in his 50-year career. “Yes, sir,” he said, “and if I’m here next year, I’ll probably say it again.”