ALBANY, N.Y. — Actress Cynthia Nixon blasted Gov. Andrew Cuomo as a “bully” and a “wannabe Republican” Monday during her first visit to Albany since announcing her bid for New York governor.

The “Sex and the City” star and public education advocate criticized the two-term governor for not doing enough to ensure equal opportunities for poor and minority students. She also faulted Cuomo’s effort to combat government corruption and said that while he touts himself as a progressive, he’s governed as a member of what she called Albany’s “old boys’ club.”

“We’ve all seen it: Andrew the bully. He bullies other elected officials. He bullies anyone who criticizes him,” Nixon said. “It reminds me of the behavior we see from Donald Trump every day. My experience has taught me that there is only one way to deal with a bully. You have to stand up to him.”

Nixon’s from-the-left challenge to Cuomo in September’s Democratic primary has upended what many had predicted to be an easy re-election for Cuomo, the son of the late Gov. Mario Cuomo. An ally of Cuomo’s nemesis, Democratic New York City Mayor Bill de Blasio, Nixon’s bid is highlighting Cuomo’s often uneasy relationship with liberals in his own party.

A spokesman for Cuomo’s re-election campaign did not immediately respond to messages seeking a response to Nixon’s comments. The campaign has previously pointed to Cuomo’s achievements including legalizing gay marriage, tightening gun restrictions, raising the minimum wage, expanding public education funding and banning fracking.

Cuomo’s allies came to his defense, with labor leader Hector Figueroa saying the election will come down to who can best serve New Yorkers, “not who can seize the most headlines by waging personal attacks against another candidate.”

Nixon, a 51-year-old New York native and Grammy, Emmy and Tony winner has never held public office, but as an activist she has lobbied extensively for better education funding and advocated for gay rights. She is the mother of three children and if elected would be the state’s first openly gay governor.

She faces a difficult run. Cuomo has a $30 million war chest and is considered a possible 2020 White House contender. A Siena College poll released last week showed Cuomo leading Nixon 66 percent to 19 percent among registered Democrats, and by a similar margin among self-identified liberals. Nixon did a little better among younger and upstate Democrats but didn’t have more than a quarter of either group.