Former Department of Homeland Security employee Philip Haney thinks he could have prevented the San Bernardino terrorist attack if the Obama administration had not shut down his surveillance investigation on the grounds that he was profiling Islamic groups.

Haney, a founding member of the DHS who worked in the Intelligence Review Unit, said Thursday on Fox News' "The Kelly File" that his team was investigating a mosque in Riverside, Calif. that was suspected to be part of a global extremist network called Tablighi Jamaat, reported Breitbart. The mosque was also attended by Syed Farook, who, with his wife Tashfeen Malik, carried out a mass shooting in San Bernardino last week, killing 14 people.

About a year into Haney's investigation, he was visited by the State Department and the Homeland Security Civil Rights Division, who accused him of profiling Islamic groups, shut down the operation and deleted 67 of his records.

"As we were tracking them, we would have put the red light on them," Haney told Fox News.

"Therefore, two things very plausibly would have happened: Either Syed would have been put on the no-fly list because of the association with that mosque and/or the K-1 visa his wife was given would have been denied because of his affiliation with a known organization."

Haney said that he told Congress and the inspector general about his investigation being blocked, but rather than it being reinstated, Haney claims his superiors retaliated by pulling him from his duties and revoking his security clearance, according to PJ Media.

Haney then filed a Freedom of Information Act request and learned that his investigation was shut down because he was engaging in profiling. The internal memos said that he was "not allowed to develop a case based on Tablighi Jamaat specifically and/or any Islamic group," according to Haney.

DHS told Fox News' Trace Gallagher that Haney's story contains "many holes" but wouldn't comment further due to privacy laws.