The auditor at BDO USA LLP casually wandered around the accounting firm’s New York offices, striking up conversations with colleagues about BDO’s audit of the large insurer AmTrust Financial Services Inc.

Unknown to the colleagues, the auditor was carrying a tiny recording device disguised as an ordinary Starbucks gift card, capturing every word for the Federal Bureau of Investigation.

The clandestine recordings in 2014, described to The Wall Street Journal by the BDO auditor, were part of a continuing federal investigation now being led by the Securities and Exchange Commission, according to people familiar with the matter.

The focus of the probe includes accounting practices of AmTrust, a fast-growing, New York-based insurance company that in recent years has attracted skepticism about its results from investors betting against its stock.

The FBI investigation and the parallel probe by the SEC haven’t been reported before. Neither has the involvement of the BDO auditor, who has joined forces with a group that is led by the man who made a name for himself exposing Bernard Madoff’s Ponzi scheme.