Allegedly bad behavior in the Legislature is cost taxpayers more than a quarter of a million dollars in October, according to the state comptroller’s office.

Both chambers of the Legislature spent six figures last month on retaining legal services related to claims of sexual harassment, according to a list of approved contracts by Comptroller Tom DiNapoli’s office.

In the Democratic-led Assembly, $150,000 was spent to extend the contract with the law firm Rossein Associates for independent investigations of sexual harassment.

In the GOP-controlled Senate, meanwhile, $121,000 was approved for two contracts with Kraus & Zuchlewski LLP “for legal counsel related to U.S. Equal Employment Opportunity Commission matters and investigation of sexual harassment claims.”

The firm has been hired in the past by the Senate in order to handle a harassment complaint in the office of Sen. Tony Avella, a Queens Democrat, in 2012. Avella himself was not the target of the complaint.

Democratic Sen. Marc Panepinto of Buffalo abruptly announced this year he would not seek another term in the chamber, at the time citing a “personnel matter” as well as allegations of sexual misconduct.

The Legislature in recent years has been rocked by allegations of sexual harassment made against state lawmakers, including the late former Assemblyman Vito Lopez, ex-Assemblyman Dennis Gabryszak and soon-to-depart Assemblywoman Angela Wozniak.