Cynthia Nixon came out swinging against New York Gov. Andrew Cuomo Wednesday night during the pair’s first and only debate before the Empire State holds its gubernatorial primary election on Sept. 13.

Nixon, the “Sex and the City” alum who is making her first run for political office, repeatedly called the two-term incumbent a “liar” and “corrupt.” The two parried over the state of New York’s overburdened subway system, the legalization of marijuana, the dearth of affordable housing, and how to deal with the state’s homeless population. The hourlong face off was sponsored by CBS O&O WCBS-TV New York and held at Hofstra University on Long Island.

Cuomo at times seemed to be running against President Donald Trump more than his liberal challenger for power in Albany. Cuomo repeatedly invoked the threats posed by Trump and cast himself and New York state as a ballast against the White House’s conservative agenda.

“He has to be stopped,” Cuomo said of Trump. He noted that Trump regularly slams him on Twitter, something he carries as a badge of honor. “I welcome it. Know me by my enemies,” Cuomo said. “Someone has to stand up to him.”

Pressed by debate moderator Maurice DuBois of WCBS, Cuomo pledged to serve out all four years of his term if re-elected, effectively taking him out of the running for the Democratic presidential nomination in 2020.

Nixon articulated her agenda that includes legalization of marijuana; allowing undocumented immigrants to apply for driver’s licenses; greater state investment in education, health care, and affordable housing; and passing legislation to give public sector unions greater rights to strike. 

Nixon was pressed by DuBois about her lack of political experience and her qualifications to oversee a state of 20 million people and a budget of nearly $170 billion. She cited her long resume as an activist and experience as an advocate and fundraiser for New York City public education. She vowed to forgo the governor’s $179,000 annual salary if elected. 

“Experience doesn’t mean that much if you’re not actually good at governing,” she said in a jab at Cuomo.

The two basically agreed on the issue of following the lead of Colorado, California, and other states in legalizing marijuana. Nixon called for a speedy implementation of legal sales in the state, while Cuomo was more cautious but cited a recent state study that concluded “the benefits outweigh the risks.”

Nixon cast legal pot as a racial justice issue, noting that persons of color are far more likely to be arrested for marijuana-related crimes than white people. She called for those now in jail for pot busts to be paroled and to have the conviction expunged.

“Effectively, marijuana in New York state has been legal for white people for a very long time,” she said. 

But nothing got the contenders more animated than their discussion of New York City’s transit woes.

Nixon bashed Cuomo for failing to invest in the state’s infrastructure. Cuomo countered that the city has to pay half of the immense bill for upgrading what he acknowledged were “40-year-old cars and 100-year-old switches.” But he resolutely stuck with his position that the city of New York has to pay its share for revamping the system that serves some 600 miles of track. “It’s a shared city-state expense,” he said, playing to upstate voters who don’t want to have to shoulder a huge tab for a service they don’t use.

Cuomo needled Nixon about the fact that as an actor she works through her own corporation. Nixon described herself as a “small business owner.” Cuomo also hammered Nixon on her record to date of disclosing tax returns. As Nixon railed against the influence of corporate money in politics — she called Cuomo “a corrupt corporate Democrat” — Cuomo asserted that Nixon uses loopholes to avoid paying “her fair share” of taxes. He also accused her of using her celebrity to pull strings with New York City Mayor Bill de Blasio’s administration. Cuomo asserted that Nixon asked de Blasio officials to ensure that helicopters did not fly over Central Park during the summer Shakespeare in the Park productions, and for helping her “Sex and the City” co-star Sarah Jessica Parker with a favor for the owner of  a “tea house,” apparently a reference to Greenwich Village’s Tea and Sympathy shop.

The two had other testy exchanges. Nixon accused Cuomo of exacerbating the subway problems by “stealing hundreds of millions of dollars” from the MTA budget for other projects. 

“He used the MTA like an ATM,” she quipped. Cuomo later made a snide reference to Nixon’s vocation in disputing her characterization of his record after seven and a half years as governor.

“My opponent lives in the world of fiction. I live in the world of fact,” Cuomo said.

At times, the political rivals were downright snippy. “Can you stop interrupting?” Cuomo said to Nixon as they argued about the subway issue. “Can you stop lying?” she shot back.

Cuomo’s campaign managed to get the first word in the telecast by buying the 30-second commercial spot that led into the debate special on WCBS. It featured clips of Nixon praising Cuomo at past events, calling his agenda “incredibly forward-thinking and incredibly progressive.”