CROWN HEIGHTS, BROOKLYN — Zellnor Myrie defeated incumbent Jesse Hamilton in the Democratic primary Thursday.

Registered Democrats in District 20 elected Myrie as their candidate on Sept. 13, as New Yorkers across the state took to the polls to chose their party's nominees for seats in the state Legislature. Myrie was 12 points ahead with 17,607 votes when NY1 called the election in his favor at about 10:10 p.m.

Myrie, an attorney and former Legislative Director in the New York City Council, successfully attacked Hamilton for his connection to the Independent Democratic Conference, promised Brooklyn he'll fight for fair housing above all else, and earned a New York Times endorsement.

Hamilton — who has represented Brownsville, Crown Heights, East Flatbush, Gowanus, Park Slope, Prospect Heights, Prospect Lefferts Gardens, South Slope, and Sunset Park since 2014 — was ultimately unable to prove he had the progressive credentials to please his Democrat constituents, despite his proposed legislation to make prejudiced 911 calls a hate crime.

Hamilton was not the only incumbent defeated by a progressive challenger in Brooklyn; Julia Salazar snagged a win against Martin Malave Dilan in Bushwick's District 18. Gov. Andrew Cuomo and Lt. Gov. Kathy Hocul faced off against activist and former actress Cynthia Nixon and Brooklyn Councilman Jumaane Williams.

Also up for grabs is the position of attorney general, which Public Advocate Letitia James, law professor Zephyr Teachout, Verizon lobbyist Leecia Eve and U.S. Rep. Sean Patrick Maloney all hope to claim.

The winners of the Thursday race will face off against Republican candidates in the Nov. 6 general election.