Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Mass-casualty attacks by ISIS show the group has been debilitated and has resorted to lashing out like a "caged" animal, a top law enforcement official said.

Europol director Rob Wainwright told NBC News that the attacks in Brussels and Paris are a sign military efforts in Iraq and Syria are squeezing the Islamist group.

Bullet holes are seen in the terrace windows of Cafe Bonne Biere, as people lay flowers and candles in front, in Paris, France, on November 15. IAN LANGSDON / EPA, file

Following these setbacks, the group "needed to somehow regain the initiative," Wainwright said in a recent interview. "We're starting to see [it is] like an animal caged in the corner [that's starting] to sort of lash out, and I think it might be part of the slow, long decline of the organization."

Following a military effort backed by a U.S.-led bombing campaign, ISIS has lost around one-quarter of its territory in Iraq and Syria, the research group IHS said in March.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

That's not to say Wainwright is blasé about the possibility of another attack — particular with France's Euro 2016 soccer tournament and Tour de France bicycle race dominating the summer calendar.

"I think we're seeing the biggest threat for a generation," the Welsh-born official said. "In terms of the numbers of radicalized people, in terms of the acts of terrorism, the brutal acts that we've seen on the streets of Europe, I haven't seen anything like it for some time."

He has "no doubt" that Euro 2016 will be on the target list, noting that ISIS "has a taste for the spectacular."

One of the shooters who killed 14 people in San Bernardino, California, in December pledged allegiance to ISIS, according to law enforcement sources, but the extremist group stopped short of taking credit for the attack.

Wainwright said ISIS would like to target the U.S. but is hindered by geography, border security and a smaller pool of foreign fighters than Europe.

Nevertheless he said the U.S. was "not complacent" and added that there were 20 U.S. federal agents working at Europol as part of a wider collaboration with Washington.

The short-term focus is on Euro 2016, which started Friday and is being policed by some of the strictest security ever seen at an event its size.

But Europol's director said he is realistic.

"When we're faced with such a complex threat we cannot reduce it to zero," he said of the chance of an attack. "There can't be totally security in society unless we give up some of the freedoms and the values that we cherish in Western democracies, and of course we're not prepared to do that because that would bending in the face of terrorism."

Europol works with the E.U.'s 28 member states, as well as other countries such as the United States, to help information sharing and cooperation.

Despite these efforts, Wainwright admitted that countries had only a "fragmented intelligence picture" of the estimated 5,000 so-called foreign fighters who have fled Europe to join ISIS.

In the era of 9/11 and al Qaeda, many recruits would be radicalized over a number of months or years by attending extremist sermons, but now young people were being radicalized online "very, very quickly," according to the police director.

Despite all this, he was adamant: "I've no doubt we will succeed, in the end, in defeating ISIS."