A senior adviser to U.S. Sen. Kamala Harris, D-Calif., resigned Wednesday over inquiries about a $400,000 harassment lawsuit against him while working at the California Department of Justice.

Larry Wallace resigned after the Sacramento Bee asked about the 2017 settlement, the paper reported.

"We were unaware of this issue and take accusations of harassment extremely seriously," Harris spokeswoman Lily Adams said. "This evening, Mr. Wallace offered his resignation to the senator, and she accepted it."

The lawsuit filed by Danielle Hartley accused Wallace of demeaning her based on her gender while she worked for him as his assistant.

DEMOCRAT KAMALA HARRIS COULD LOSE SEAT ON SENATE JUDICIARY COMMITTEE, REPORT SAYS

Hartley said Wallace placed his computer printer under his desk and often asked her to crawl under and refill it with paper as he sat and watched, sometimes with other men in the room. Wallace refused to move the printer to another location when Hartley asked him to do so, according to the suit.

The suit also said Wallace had Hartley run his personal errands, including booking flights for his children and washing and performing maintenance on his car. When she would return from the assigned tasks, the lawsuit states, “co-workers would make hostile comments to her including, ‘Are you walking the walk of shame?’”

She said she reported the alleged harassment in 2011, but was retaliated against. Hartley was involuntarily transferred to another office at the state Department of Justice at the end of 2014, the suit said.

Xavier Becerra, who succeeded Harris as California’s attorney general, said Hartley “unreasonably failed to utilize the procedures during the period of time, and after, the alleged harassment or discrimination was occurring."

Wallace previously served as director of the Division of Law Enforcement under then-California Attorney General Harris and worked for her during her tenure as district attorney for San Francisco.

Harris has been a vocal supporter of the #MeToo movement and is contemplating whether to launch a 2020 presidential bid. In June, she introduced legislation to ban forced nondisclosure agreements in harassment settlements.

KAMALA HARRIS, AMID 2020 RUMORS, FLOATS $500 A MONTH TAX CREDIT

Hartley is barred from discussing the settlement amount and agreed not to apply for jobs with the state Justice Department. Neither she nor Wallace commented to the Bee.

The Associated Press contributed to this report.