It’s not just a boys’ club anymore.

Months after getting its first female governor, New York now has two prominent women running to lead the state in the wake of Andrew Cuomo’s resignation in August amid allegations he sexually harassed women.

Both candidates in next year’s race — Gov. Kathy Hochul and her newly declared challenger, state Attorney General Letitia James — each had a key role surrounding Cuomo’s resignation, as well as their own histories of breaking barriers and finding political opportunities in the wake of misbehaving male politicians.

James, whose office investigated the allegations against Cuomo, officially jumped into the gubernatorial race Friday, setting her up as the strongest challenger for Hochul, a fellow Democrat who is seeking to win the office herself after taking over for Cuomo.

Either would be the first women elected to a post that, prior to Cuomo’s resignation, men had held exclusively for 240 years.

James, 63, is the first woman elected as New York’s attorney general and the first Black person to serve in the role, where she repeatedly challenged former President Donald Trump’s administration and oversaw an investigation that led to criminal charges against his company and its chief financial officer.

“I’ve sued the Trump administration 76 times. But who’s counting?” James said in her campaign kickoff video Friday, making a playful shrug of her shoulders as she looked into the camera.

The Brooklyn progressive has also mounted legal challenges against the National Rifle Association, but her office’s investigation into the allegations involving Cuomo had perhaps the biggest impact on her political future.

A sweeping report issued by her office concluded the 11 women who accused Cuomo of sexual harassment were credible. Though Cuomo denies mistreating women, he resigned, saying he wanted to avoid putting the state through turmoil.

With Cuomo out of the running in New York — at least for now — a number of rising Democrats are eyeing next year’s race, with James and Hochul leading the pack.

New York City Public Advocate Jumaane Williams and New York City Mayor Bill de Blasio have both said they are considering a run. Two other potential Democratic candidates come from Long Island: Suffolk County executive Steve Bellone and U.S. Rep. Thomas Suozzi, who lives in Nassau County.

Hochul, who had been Cuomo’s lieutenant governor, has stressed how her duties kept her separate from him. Since she was sworn into the governor’s mansion, the 63-year-old quickly worked to set a different tone from her former running mate, promising transparency and ethics reforms.

Both women gave a nod to their history-breaking roles on Friday.

Hochul, speaking to Democratic power players at a breakfast in Brooklyn, said she felt “the weight of history” on her shoulders to show a woman could govern New York “with strength, with heart and passion.”

“When I’m done with my terms, no one will ever question the ability of a woman to hold the highest office in this state or in this land,” Hochul said.

James, in a fundraising appeal to supporters shortly after announcing her campaign, said too many people tried to count her out and write her off as a statistic when she was a Black girl growing up in Brooklyn.

“Then I made history by becoming the first Black woman to be elected to a statewide office in New York – but the truth is, that distinction is nothing more than a historical footnote if you don’t do any good with the office,” she said.

Either would make history merely by getting nominated. No major party in New York has ever endorsed a woman for governor, said Kelly Dittmar, director of research at the Center for American Women and Politics at Rutgers University.

Just 45 women have served as governors in the U.S., including nine currently in office, but none of them have been Black.

James is one of six Black women running in 2022, tying a record set in 2018. That year, Georgia Democrat Stacey Abrams became the only Black woman ever to receive a major-party nomination for governor.

“One of my fun games to play is like, ‘Here’s how many women have ever served, here’s how many men serve today,'” Dittmar said. “Governor is just that continued spot where women just are persistently underrepresented. It’s just made even more so when you look at women who are not white.”

Hochul and James haven’t just broken barriers, they’ve picked up the pieces and thrived after stepping in to replace male politicians who behaved badly.

In 2011, Hochul won a seat in Congress in a special election in 2011 after Republican Rep. Chris Lee resigned in disgrace once shirtless photos he sent to a woman while married surfaced online. Hochul lost her reelection bid in 2012 and, in 2014, Cuomo selected her as his running mate as he ran and won a second term.

In 2018, James, then New York City’s ombudsman-like public advocate, jumped into a four-way Democratic primary to replace Attorney General Eric Schneiderman after he abruptly resigned amid allegations that he abused women.

James said she was weighing a possible run for mayor when the attorney general’s seat opened up and that she was initially hesitant to enter the race, even as fellow Democrats were floating her name as a candidate.

When she ran, Cuomo was one of James’ strongest political allies, giving her an endorsement and headlining a fundraiser.

Like Hochul, James’ relationship with Cuomo’s has soured.

The former governor has attacked James’ report as inaccurate and biased. James has dismissed the charge that her investigation was politically motivated, saying Cuomo should take responsibility for his own conduct.

James made her announcement the day after a criminal complaint was filed against Cuomo in Albany, accusing the former governor of committing a misdemeanor sex crime of groping a woman in December 2020.

Cuomo’s lawyer, Rita Glavin, said in a statement that the Democrat never assaulted anyone.

He’s due in court Nov. 17 to respond to the charge.