Greg Sandoval/CNET

Against a backdrop of lost, unreleased devices and allegations that employees impersonated policemen, Apple forced the company's chief of security into retirement, according to a source with knowledge of the situation.

John Theriault, a former FBI agent who came to Apple from Pfizer in 2007, was the man in charge of Apple's security unit during a span that saw the company embarrassed multiple times when important trade secrets were exposed.

Theriault was not immediately available for comment, and a Apple spokesman declined to comment. The blog 9to5mac.com first reported Theriault's departure.

The troubles with Apple's security appeared to begin in March 2010, when an Apple engineer lost control of a prototype iPhone 4 during a night of drinking in a Redwood, Calif., bar. The handset was obtained by two men who later sold it to the blog Gizmodo, which published details about the phone.

In August 2010, a search by federal agents of the home belonging to Paul Shin Devine, an Apple global supply manager, turned up shoe boxes full of cash. Devine was accused of selling information about Apple to company suppliers so they could negotiate a better deal with his employer. He was charged with wire fraud, money laundering, conspiracy, and accepting kick backs.

The most recent high-profile security goof occurred in July, when two of Apple's investigators went searching for another missing unreleased handset.

In August, CNET reported that Apple's security personnel went to San Francisco police and told them that an employee had lost a "priceless" unreleased phone, again in a bar, and that they had electronically tracked the device to a home in the city's Bernal Heights neighborhood.

When plainclothes officers and the Apple employees visited the home, Sergio Calderon, 22, acknowledged being at the bar the night it went missing but denied any knowledge of the device.

David Monroe, Calderon's attorney, told CNET that badges were flashed and Calderon was informed that if he didn't voluntarily submit to a search of his home, car, and computer, a search warrant would be obtained. Monroe said Calderon agreed to the search but wouldn't have had he'd known it would be conducted by Apple employees.

The San Francisco Police Department says its officers never entered Calderon's home. The search failed to turn up the errant phone and now the actions of Apple's security team could draw the company into litigation.

Monroe said last month that if he didn't get answers from the police and Apple about the incident, he would file suit. Monroe said previously and repeated today that he and Apple are in negotiations.

But forcing Theriault out now, with possible litigation hanging over Apple's head, could be a risky move according to Ira Winkler, an expert on corporate espionage and author of the book "Spies Among Us."

Winkler doesn't think it's a wise thing to do when Apple may yet be required to explain the search of Calderon's home to a jury.

"While I know nothing directly about the case, my gut tells me that a company does not lay off or induce somebody to quit while it is potentially being accused of wrongdoing led by that person," Winkler said. "It's almost an admission that [the company and its employees] did do something wrong and likewise potentially creates a grudge against the company by the former employee. That person could end up being the best witness against them."