Democrat Christine Pellegrino has defeated Republican Thomas Gargiulo in the District 9 State Assembly special election, an upset in a district that Donald Trump won by 23 points in the 2016 presidential race.

With all election districts reporting, unofficial results had Pellegrino ahead of Gargiulo by margins of 3,338-2,282 in Suffolk County and 2,252-1,767 in Nassau County. Pellegrino, an elementary school reading teacher for the past 25 years, replaces Republican Joseph Saladino, who had held the seat since 2004. Saladino stepped down after being appointed Oyster Bay Town supervisor in January.

#ChristineNY09 wins AD9 We #flippedthe9th #unionstrong pic.twitter.com/XGFGrsc3BE

— Christine Pellegrino (@ChristineNY09) May 24, 2017 "Thank you to all the volunteers and supporters who worked so hard during my campaign," Pellegrino, 48, posted on her Facebook page. "I look forward to representing the people of the 9th Assembly District!"

Pellegrino, of West Islip, was a delegate for Bernie Sanders at the 2016 Democratic National Convention. She is a leader of Long Island Activists, which was formerly Long Island for Bernie.

The 9th District includes Bay Shore, Copiague, East Massapequa, Fire Island, Gilgo Beach, Massapequa, North Amityville, North Babylon, Oak Beach-Captree, Seaford, South Farmingdale, West Babylon, West Bay Shore, West Islip, Babylon, Brightwaters and Massapequa Park.

The district is one of 710 state legislative districts that intersects with one or more "Pivot Counties," or counties that voted for Trump for president in 2016 after voting for Barack Obama in 2008 and 2012.

Trump won the district with 61 percent of the vote. Saladino, in his last bid for re-election, defeated Democrat Brendan Cunningham by a 69-31 percent margin. Cunningham, as evidenced by the tweet below, was quite impressed by Pellegrino's victory.