A state judge on Monday ruled Zephyr Teachout can remain on the Democratic primary ballot next month, setting up a three-way contest between the Fordham law professor, incumbent Gov. Andrew Cuomo and comedian-activist Randy Credico.

In a statement, Teachout renewed her call for a debate with Cuomo.

“Today we beat the Governor and his old boys club in court. 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,” she said in a statement. “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.”

Cuomo’s re-election campaign challenged Teachout’s residency on the grounds she did not meet the five-year residency requirement to run for state office in New York.

Teachout, a former campaign advisor to ex-Vermont Gov. Howard Dean, argued she had been teaching and living in New York City since 2009.

A judge sided with Teachout’s claims in a ruling Monday afternoon following a two-day hearing that included Teachout’s own mother, a judge in Vermont, testifying in her defense.

Cuomo’s campaign did not challenge the ballot status of Credico, who has run for mayor of New York City and U.S. Senate.

A primary challenge means Cuomo can raise an additional $19,700 above the maximum contribution of $41,400.

Teachout had initially sought the Working Families Party ballot line in May, but lost the endorsement to Cuomo, who won the support of the labor-backed party with a promise to help Democrats retake control of the state Senate.

Updated: In the ruling, Judge Edgar Walker writes “It is evident that, since June 2009, Ms. Teachout has clearly ‘lived’ in New York, as that term is commonly understood, in order to pursue her career as a Fordham professor.”

The ruling comes despite lawyers for the Cuomo campaign submitting evidence that showed Teachout’s driver’s licence during the last several years was for Vermont and that she initially used her parents’ Vermont address.

Walker ruled that Teachout’s “physical presence” in New York demonstrated she planned live in the state permanently.

Document by Nick Reisman