UBS Group AG settled a lawsuit brought by a former trainee in London who said she was raped by a senior employee, according to her attorney.

The Swiss lender agreed to settle the claim after the trainee, who was identified in court documents as Ms. A, alleged that UBS failed to protect her and that its investigation of her complaint was flawed. The female graduate, who worked on the trading floor, had also told former UBS investment-banking head Andrea Orcel of the “sexualized atmosphere” on the desk.

“UBS and Ms. A have reached a mutual resolution in relation to this matter as a result of which Ms. A has withdrawn her claim,” her lawyer, Suzanne McKie, said in a statement.

A representative for the bank declined to immediately comment. Terms of the settlement weren’t discosed.

The trainee says she was compelled to sit near the executive whom she had accused of rape. The trainee had to take the fire escapes to avoid coming across the senior banker and raised this with the lender’s human-resources department, McKie said in a statement when she first brought her claim at the employment tribunal in March last year.

The alleged rape was said to have taken place in September 2017 and is still being investigated by police.

The alleged perpetrator resigned from the investment bank in March 2018, five months after he was suspended, two people familiar with the matter have previously said. UBS hadn’t started a formal disciplinary procedure by the time he departed the Swiss lender, the people said. The trainee, who can’t be identified for legal reasons, left the bank in June 2018.

“While we would never comment on individual claims ahead of formal hearings, back in November an independent investigation into sexual misconduct allegations made by a former UBS employee concluded that UBS made no fundamental errors,” the bank said in a statement when the trainee brought her claim. “Recommendations were made for improvement and we are implementing these changes.”

This article was provided by Bloomberg News.