SACRAMENTO — State Sen. Kevin de León was quick to criticize Sen. Dianne Feinstein for her handling of an attempted-rape allegation against Supreme Court nominee Brett Kavanaugh, saying his fellow Democrat and election opponent showed a “failure of leadership” by staying quiet for weeks.

The reaction of many #MeToo activists was scathing: They said that if anyone showed a failure of leadership, it was de León during his time leading the state Senate as sexual harassment scandals were coming to a boil.

“He dragged his feet on taking action,” tweeted Alicia Lewis, a former lobbyist who said she was fired from her firm in retaliation soon after signing a letter in October titled, “We Said Enough,” that prompted the #MeToo movement in the state Capitol.

Now Playing:

“Did you not believe all the women in the Capitol who wanted to come forward, but couldn’t because you blocked my whistleblower bill and they had no protection?” added Assemblywoman Melissa Melendez, R-Lake Elsinore (Riverside County). “You are no champion for women.”

De León, D-Los Angeles, was Senate president pro tem from 2014 until March. The last months of his tenure coincided with an explosion of accusations against state lawmakers, lobbyists and legislative staffers of rampant sexual harassment and abuse, some of which went back decades.

Women in state politics demanded action. And de León promised it.

The misconduct allegations led to three lawmakers resigning, including de León’s then-roommate, former Sen. Tony Mendoza, D-Artesia (Los Angeles County). A Senate investigation found that Mendoza, with whom de León shared an apartment while in Sacramento, “more likely than not” engaged in “sexually suggestive behavior” with six women in the Capitol over more than a decade, including legislative staffers, fellows, an intern and a lobbyist.

De León has said he was shocked to learn about the allegations and never witnessed any of that behavior by Mendoza. But some were skeptical that de León was in the dark, since he headed a Rules Committee that handles complaints against lawmakers. Still, de León was a driving force in pushing Mendoza to resign under the threat of expulsion.

Others have criticized de León for repeatedly blocking the bill by Melendez to extend whistle-blower protections to legislative employees, including those who make allegations of sexual harassment.

Every year for four years, the bill came before the Senate Appropriations Committee, which killed it without explanation. De León was the committee chairman one of those years and Senate leader the other three.

After the #MeToo movement gained momentum, de León said he had opposed the bill because he believed existing protections were sufficient.

Nanette Farag, an Assembly Republican staff member, said that unlike in the Kavanaugh case, de León didn’t muster much outrage over sexual misconduct complaints that happened on his watch.

“Dozens of people came forward in the Legislature, and we saw what has happened to women who named someone,” Farag said. “Many women were shamed, they were accused of doing it for political gain, and their names were dragged through the mud.”

After the #MeToo allegations swept through the Capitol, the Legislature overhauled how it handles sexual harassment claims and passed Melendez’s whistle-blower bill. De León pointed to those changes as a monumental shift that will ensure future victims are heard, saying in a statement Wednesday that “our California Legislature confronted some hard truths head-on over the last year.”

Lawmakers created a legislative unit to handle sexual harassment investigations so they were not handling complaints against themselves or their staffs. A Sacramento nonprofit was brought in to provide confidential support services, and a hotline and website for victims to anonymously report sexual harassment were created.

Through a campaign spokesman, de León declined an interview request Wednesday.

The reaction to de León’s criticism of Feinstein may indicate the limits of what he can gain politically from the controversy surrounding the senator as he fights an uphill battle to unseat her in November.

De León said Feinstein should have found a way to bring attention to the allegations contained in a letter from Christine Blasey Ford, the Palo Alto University psychology professor who says a drunken Kavanaugh tried to rape her at a party when they were both in high school in the early 1980s. He complained that Feinstein, the Senate Judiciary Committee’s ranking Democrat, had “pantomimed her way through (Kavanaugh’s confirmation) hearings without a single question about the content of Kavanaugh’s character.”

Ford’s attorneys have praised Feinstein for honoring the professor’s request of confidentiality. De León argued that a redacted letter could have addressed that issue and given Democrats a better chance of blocking Kavanaugh’s confirmation.

Feinstein said Ford “requested confidentiality and I honored that. It wasn’t until the media outed her that she decided to come forward.”

Micha Star Liberty, an Oakland attorney who represents several women who have filed lawsuits against the Legislature in the past year, said de León’s criticism that the letter should have been released earlier equates to “mansplaining.”

“It’s really disappointing for this issue to be used as a political football, particularly by someone who had the power to act and didn’t, and then when he was forced to take steps they were missteps, including not respecting confidentiality in some cases,” Liberty said.

In one case, a redacted letter about a substantiated sexual misconduct allegation made it easy for Capitol insiders to pinpoint who the victim was, Liberty said.

“His handling of these issues when he was in charge is not what I would call best practices,” Liberty said.

Melody Gutierrez is a San Francisco Chronicle staff writer. Email: mgutierrez@sfchronicle.com. Twitter: @MelodyGutierrez