The state Assembly and Senate combined for nearly $1 million in legal fees last month associated with various sexual harassment scandals in one house and for representation related to the Moreland Commission To Investigate Public Corruption in the other, according to Comptroller Tom DiNapoli’s office.

The Democratic-led Assembly was approved for $545,000 to “various recipients” in order to settle the sexual harassment lawsuit against one-time Brooklyn power broker Vito Lopez.

The former assemblyman resigned following a Joint Commission on Public Ethics report that revealed the details of abuse and harassment by Lopez directed toward his legislative staff.

Ultimately, two staffers sued Lopez and the Assembly in court, which was recently settled.

Meanwhile, the Assembly also spent $13,000 for outside legal counsel from Whiteman Osterman & Hanna in the appeals process for former Assemblyman Micah Kellner, who was accused of sending inappropriate texts and online chats with legislative employees.

Kellner did not run for re-election last year.

In the Republican-led Senate, $435,000 was approved in legal bills to Kirkland & Ellis, which is special counsel for the conference in the Moreland Commission investigation.

The commission ultimately shuttered last year following an agreement on ethics measures in the state budget.

The panel’s closure, as well as the evidence it generated, is being reviewed by U.S. Attorney Preet Bharara.