Recent attacks on civilians in the U.S. and Europe have exposed a gap in the intelligence community's efforts to track suspected extremists and prevent mass killings, half a dozen American, British and French counterterrorism officials said.

The attacks have a common theme of being carried out by actors with an apparent history of mental illness — but few if any direct links to extremist groups, the officials said.

From both a legal and a strategic perspective, counterterrorism investigators globally are focused on plots by established violent groups with known ideologies, such as Islamic State. In the U.S., laws designed to protect citizens from intrusive government spying can limit investigations of individuals unless they have provable ties to foreign terror groups.