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

The FBI has not done enough to identify and fight homegrown extremists, the Department of Justice’s internal watchdog said Wednesday.

The agency also failed to follow up on some cases that had been flagged as potential threats to the country, Justice Department Inspector General Michael Horowitz wrote in his report.

“The FBI has not taken a comprehensive approach to resolving deficiencies in its counterterrorism assessment process,” Horowitz concluded.

The FBI defines homegrown violent extremists as “global jihad-inspired” individuals who were radicalized in the United States and are not taking marching orders directly from “foreign terrorist organization” like Al Qaeda or the Islamic State militant group.

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

Since the Sept. 11, 2001, terror attacks, homegrown American jihadis have carried out over 20 attacks in the U.S., Horowitz wrote.

The best-known example of this was the married couple Syed Farook and Tashfeen Malik, who in 2015 massacred 14 people and wounded 22 more in San Bernardino, California, before they were killed in a police shootout.

While Malik pledged allegiance to ISIS before embarking on the shooting spree, the FBI concluded that neither he nor Malik were directed by a foreign terrorism outfit. In fact, they had become radicalized before the rise of ISIS and were not on the FBI's radar, the agency reported.

In a letter responding to Horowitz included in the report, the FBI said it agreed with the seven recommendations for the FBI. "The FBI has conducted reviews of the assessment process and has made changes to implement best practices and make recommended changes," the letter said.

Horowitz found that in some cases, the FBI failed to follow up on suspects who were flagged as potential threats.

Also, the FBI has not developed a strategy for determining whether a person under investigation — and who has mental health issues — poses “an actual threat to national security or public safety,” he wrote.

The FBI conducted reviews after domestic terrorist attacks to find out what it had missed, but often failed to make sure that agents followed through with its proposed improvements, according to him.

The FBI concluded in 2017 that it should have conducted about 6 percent of its counterterrorism assessments more thoroughly, Horowitz wrote. But the agency did not re-examine nearly half of those cases for 18 months.