NEW YORK — Newly announced New York gubernatorial candidate Cynthia Nixon on Tuesday criticized Gov. Andrew Cuomo, her Democratic primary opponent, for favoring corporations and the rich over average New Yorkers.

The liberal activist and “Sex and the City” actress took aim at Cuomo in her first official campaign appearance, telling the audience at the Bethesda Healing Center in Brooklyn that she had just made it to the event “in the nick of time” because of subway delays that she blamed on “Cuomo’s MTA.”

The Metropolitan Transportation Authority oversees the subways, and Cuomo controls the MTA. An MTA spokesman said on Twitter there had been a sick passenger.

Nixon went on to criticize inequality in the state, which she blamed on policy choices like tax cuts for corporations and wealthier New Yorkers, and called out corruption in state government.

“If Washington is a swamp, Albany is a cesspool,” she said. She cited a former Cuomo top aide, Joseph Percoco, who was convicted this month on federal bribery and fraud charges.

Cuomo was not accused of any wrongdoing, but the trial put a spotlight on Albany’s pay-to-play culture.

Nixon said she voted for Cuomo eight years ago in hopes of his being a “real Democrat” but that “New York’s eight years under the Cuomo administration have been an exercise in living with disappointment, dysfunction, and dishonesty.”

She said the state could have tackled a range of issues, from fully funding public schools to fixing the beleaguered subway system and enacting campaign finance reform.