Updated

New York Gov. Andrew Cuomo debated actress and activist Cynthia Nixon Wednesday night ahead of their Democratic gubernatorial primary next month.

At Long Island's Hofstra University, the two candidates engaged in an often contentious debate, which included accusations of lying on both sides.

NIXON CUOMO DEBATE

New York Gov. Andrew M. Cuomo and Cynthia Nixon shake hands at Hofstra University in Hempstead on Wednesday, Aug. 29, 2018 ahead of their the Democratic gubernatorial primary debate. (J. Conrad Williams Jr./Newsday via AP, Pool)

CYNTHIA NIXON'S TEAM CITES SEXISM OVER ROOM TEMPERATURE AHEAD OF CUOMO DEBATE: REPORT

Nixon, a former co-star of HBO's "Sex and the City," went after Cuomo early on, calling him an "Albany insider" and a corrupt liar. She said that experience doesn't matter if a politician is bad at governing.

Cuomo shot back at Nixon, claiming she lives in a "world of fiction" while he lives in the real world while alleging that she doesn't understand the challenges of leading New York.

Identifying key factors of running the state such as fire management and the subway system Cuomo argued that the "main risk to the state of New York" is President Trump, and that the governor "need[s] to know how" to stand on the front lines.

Referencing the president's attacks on him earlier this month for saying America "was never that great," Cuomo said he stands up to Trump, but Nixon disagreed, and said the incumbent backed down fairly quickly.

While discussing New York City's MTA transit system, the two accused each other of lying and the back and forth got heated when Cuomo asked Nixon to "stop interrupting" him.

"Can you stop lying?" Nixon shot back.

"Yeah, as soon as you do," Cuomo responded.

'SEX AND THE CITY' STAR CYNTHIA NIXON COULD BE NEW YORK'S NEXT GOVERNOR: A LOOK AT HER POLITICAL ACTIVISM

Later, the governor accused his opponent of seeking political favors as a private citizen, mentioning a "tea house for Sarah Jessica Parker," Nixon's friend and co-star of their HBO show.

"That wasn't a favor?" Cuomo asked.

"I don't even know what you're referring to," Nixon said, to which Cuomo quipped she "should really read the newspapers."

According to the Daily News, Parker once emailed Nixon a complaint about Tea & Sympathy, a restaurant in the West Village. Parker reportedly passed on a message from the shop mentioning a fear of losing it's lease due to an issue with back taxes.

Nixon sent Parker's email to "several people" within Mayor Bill de Blasio's office, and his chief of staff said he'd look into it, according to the news outlet.

Cuomo promised that, if re-elected, he would not run for president in 2020 and would remain governor.

0b61984f-nixon cuomo debate

New York Gov. Andrew Cuomo and Democratic New York gubernatorial candidate Cynthia Nixon engage during a gubernatorial debate at Hofstra University in Hempstead, N.Y., Wednesday, Aug. 29, 2018. (AP Photo/Craig Ruttle, Pool)

"I will serve four years as governor of the state of New York," Cuomo told the audience, adding that the "only caveat is if God strikes me dead."

The Democratic gubernatorial primary is set for September 13. The winner will face Republican Marc Molinaro and independent Stephanie Miner in November.

The Associated Press contributed to this report.