Goldman Sachs Group Inc (GS) said a contractor emailed confidential client data to a stranger's Gmail account by mistake, and the bank has asked a U.S. judge to order Google Inc (GOOGL) to delete the email to avert a "needless and massive" breach of privacy.

The breach occurred on June 23 and included "highly confidential brokerage account information," Goldman said in a complaint filed last Friday in a New York state court in Manhattan.

Goldman did not say how many clients were affected, and wants Google's help in tracking down who might have accessed the data. The Wall Street bank also said Google "appears willing to cooperate" if there is a court order.

Google, Goldman and Goldman's law firm did not immediately respond on Wednesday to requests for comment.

According to Goldman, the outside contractor had been testing changes to the bank's internal processes in connection with reporting requirements set forth by the Financial Industry Regulatory Authority.

Goldman said the contractor meant to email her report, which contained the client data, to a "gs.com" account, but instead sent it to a similarly named, unrelated "gmail.com" account.

The bank said it has been unable to retrieve the report or get a response from the Gmail account owner. It said a member of Google's "incident response team" reported on June 26 that the email cannot be deleted without a court order.

"Emergency relief is necessary to avoid the risk of inflicting a needless and massive privacy violation upon Goldman Sachs' clients, and to avoid the risk of unnecessary reputational damage to Goldman Sachs," the bank said.

"By contrast, Google faces little more than the minor inconvenience of intercepting a single email - an email that was indisputably sent in error," it added.

Goldman is based in New York, and Google in Mountain View, California.

The case is Goldman, Sachs & Co v. Google Inc, New York State Supreme Court, New York County, No. 156295/2014. 

(Reporting by Jonathan Stempel in New York; Editing by Dan Grebler)