Cynthia Nixon got a lesson in power politics at the state Democratic convention on Wednesday.

Nixon spent the morning in hostile territory, insisting that her campaign has a shot against the powerful two-term incumbent, Gov. Andrew Cuomo.

“I am not a protest candidate,” she told reporters at the Hempstead LIRR station before heading to the convention at Hofstra University.

Cuomo won support from more than 95 percent of the delegates and was later endorsed by Hillary Clinton, who told the crowd: “We need leaders who believe in producing results and getting things done — leaders like Andrew Cuomo.”

It was clear from the beginning that the deck was stacked against Nixon, who couldn’t muster the minimum 25 percent of the vote needed to get on the September primary ballot without rounding up thousands of signatures on nominating petitions.

Cuomo allies delivered slideshows to the delegates that touted his $15 minimum wage, airport and bridge projects, support for gay marriage and paid family leave policy.

At one point, Nixon was forced to address a gathering of progressive delegates without a microphone, while a nearby committee controlled by Cuomo allies had a sound system.

A spokeswoman for Cuomo’s campaign said there was no intended slight and that none of the delegate meeting rooms had microphones. She added it was standard practice for the party’s executive committee to use a sound system.

Meanwhile, in Midtown, Republicans assembled their own ticket.

As expected, GOP delegates unanimously backed Dutchess County Executive Marc Molinaro for governor at the Ziegfeld Ballroom confab.

He told a crowd of 350 that, if elected, he would establish a new commission to probe corruption in Albany.

Cuomo came under scrutiny from federal prosecutors after he disbanded a Moreland Commission panel in 2014.

Molinaro, 42, was introduced by former Gov. George Pataki, the last Republican to hold the post.