A manager for a Bay Area solar-power giant used cocaine and popped pills in the office, refused to stop touching a female employee, and told a subordinate to bring a gun to work and shoot another employee if the man showed up angry, a lawsuit by two former employees alleged.

Francisco Bandeira, Jr., a manager in the San Francisco headquarters of Sunrun — a residential-solar firm valued at $3.2 billion in the stock market — “often acted erratically and violently” while impaired by drugs or alcohol, the lawsuit claims.

“Bandeira routinely engaged in heavy substance abuse at work, consuming cocaine, alcohol, and prescription pills in the office, at work conferences, and work events,” the lawsuit filed Friday in San Francisco County Superior Court on behalf of Nick Thierry and Evelyn Barrera said. “Bandeira pressured employees, including … Barrera, to partake in cocaine, alcohol, and crack in the office or at work events.”

Barrera alleged that three months after she started in sales at Sunrun in San Francisco in late 2021, Bandeira slapped her backside as she stood outside a meeting. She told him to never do it again, but Bandeira “repeatedly” touched her inappropriately over the next year, while appearing intoxicated on alcohol or drugs, the lawsuit said.

After Barrera refused Bandeira’s “repeated advances and pressure to take drugs and alcohol,” she found out he was “making degrading comments about her to other employees in the office,” the lawsuit alleged.

Bandeira could not be reached for comment. Sunrun did not immediately respond to requests for comment and for an interview with Bandeira. It was unclear if Bandeira currently works at Sunrun.

Thierry started in sales in Sunrun’s headquarters in 2021, and by 2022 led the company in sales, according to the lawsuit.

“Thierry personally reported Mr. Bandeira’s in-office drug use to two of (Sunrun’s) vice presidents, as well as the sales director,” the lawsuit claimed. “Thierry made these reports at least 10 times over the course of 2022.”

Sunrun, the lawsuit alleged, “took no corrective action.”

In the spring of 2022, Bandeira and another employee got into “an out-of-office altercation,” the lawsuit claimed. Bandeira instructed a direct subordinate “to bring a gun into work and shoot said employee if he showed up angry to an upcoming work meeting,” the lawsuit alleged.

Although the purported incident was reported to Sunrun’s human resources department, the company “took no corrective action,” the lawsuit claimed.

Bandeira’s behavior “continued to escalate through 2022 and 2023,” with Sunrun failing to rein him in, the lawsuit alleged.

Near the end of 2023, Thierry and Barrera were allowed to move to Sunrun’s Los Angeles office, but because they still had to work with Bandeira, conditions did not improve, the lawsuit claimed. Sunrun directed Bandeira to deny the two the resources they needed to run the L.A. office by withholding personnel and engaging in “a concerted effort to make the work so difficult” the two would quit, the lawsuit alleged. Barrera, unable to tolerate the situation, resigned in December 2023, the lawsuit claimed.

Early this year, Thierry arrived at work and discovered his office had been cleared out and his belongings “placed in boxes in a janitor’s closet,” the lawsuit alleged. Thierry contacted the personnel department but received no response, the lawsuit claimed. Thierry quit in February, according to the lawsuit.

He and Barrera are seeking unspecified damages.