Google agreed to pay $135 million in exit packages to two top executives who left the company after being accused of sexual harassment and covered up the reasons for their departures, according to a complaint filed in a lawsuit unsealed Monday.

The former executives, Andy Rubin and Amit Singhal, oversaw some of the company’s most important and profitable arms.

Mr. Rubin, who left in 2014, created the company’s crucial Android software, while Mr. Singhal, who departed in 2016, headed search.

Mr. Rubin was accused by a subordinate of pressuring her into oral sex, among other claims, according to the lawsuit. Mr. Singhal was accused by a female employee of groping her at a “boozy off-site event,” according to the suit. The board of Google’s parent, now called Alphabet Inc., approved the payments with little dissent, according to the lawsuit.

FACEBOOK BACKTRACKS AFTER REMOVING ELIZABETH WARREN'S ADS BLASTING THE PLATFORM, DRAWING ANOTHER REBUKE

The complaint, which cites information from Google, says the company agreed to pay Mr. Singhal about $45 million, the first time that number has been made public. It only ended up paying $15 million because Mr. Singhal later joined a competitor.

Ellen Stross, attorney for Mr. Rubin, said, “Andy strongly denies any misconduct.” Mr. Singhal didn’t respond to a request for comment. The New York Times last year reported the amount of some payouts, including $90 million to Mr. Rubin.

A Google spokeswoman said in a statement: “There are serious consequences for anyone who behaves inappropriately at Google. In recent years, we’ve made many changes to our workplace and taken an increasingly hard line on inappropriate conduct by people in positions of authority.”

The public disclosure of the payments came in a civil shareholder lawsuit filed in California Superior Court that alleges Google schemed to cover up persistent sexual harassment and discrimination. Google provided the information about executive payments and board deliberations in response to the suit.

Click here for more from The Wall Street Journal, where this story was first published.