J.P. Morgan Chase reportedly ousted its "special operations" head after learning that his insider security group had started spying on the bank's top executives.

With the help of more than 100 engineers from the data mining company Palantir, Peter Cavicchia III collected emails, browser histories and GPS locations from company phones, as well as transcripts from recorded phone conversations. The original surveillance, started in 2009, was sanctioned by the bank as a means to keep tabs on potentially dishonest traders, according to a Bloomberg News report published Thursday.

The extensive data collection, however, came to an abrupt halt after Cavicchia "went rogue," collecting data on some of the bank's senior executives and sparking an internal scandal, the report said. He was forced to resign in 2013.

J.P. Morgan Chase declined to comment on this article.

Founded in 2004 by Peter Thiel, Palantir originally made a name for itself working for federal agencies, including the CIA and other members of the U.S. intelligence community. Palantir tech has been credited with helping the U.S. military detect roadside bombs in Afghanistan as well as helping create a controversial license plate database for the State of California.

Read the full Bloomberg News report here.