A push by Gov. Andrew Cuomo’s supporters to dispatch primary challenger Zephyr Teachout from the Democratic primary ballot is over, with David beating Goliath in court.

A State Supreme Court judge in Brooklyn ruled Monday that Teachout can remain on the ballot, rejecting a Cuomo campaign challenge to knock her off for not being a resident of the state for at least five years.

Teachout grew up in Vermont and landed in New York in 2009 as a Fordham faculty member. She still teaches law at the college.

In a statement, Teachout came across as confident and triumphant while looking ahead to the primary less than a month away.

“Today we beat the Governor and his old boys club in court,” she said. “His two attempts to knock me off the ballot have failed — first by challenging my petition signatures, and second by challenging my residency. We won Rounds 1 and 2. Now it’s time for Round 3: a debate. New York Democrats deserve a debate between Andrew Cuomo and myself about the issues that real New Yorkers care about: schools, fracking, corruption and building a fair and strong economy.”

While much of the statewide electorate does not know her, Teachout has persistently slapped Cuomo over, most recently, ethics. The Moreland Commission controversy that blew up last month has been a key point in her campaign.

Teachout joins comedian Randy Credico on the ballot as the Cuomo challengers.

Now safely on the ticket, the law professor issued a challenge to her main competitor following her victory in court.

“There wasn’t supposed to be a primary in Andrew Cuomo’s New York,” she said to round out her statement. “Game on.”