"I think we had a positive message and we focused on what's important in the 1st District: quality of life, land preservation, environmental quality and keeping down the size of government," Krupski said.

Turnout for the race to represent the county's 1st Legislative District -- the largest of 18 -- was about 15 percent of its 61,789 registered voters. During the last special election to fill an open seat on the legislature, won by Mount Sinai Democrat Sarah Anker in March 2011, turnout was 13 percent.

The 1st District covers all of Riverhead, Southold and Shelter Island towns, and eastern Brookhaven, from East Shoreham on the North Shore to Center Moriches on the south. The seat opened in November, when Republican Edward P. Romaine became Brookhaven supervisor.

Krupski, 52, of Cutchogue, runs his family's pumpkin farm and has served on Southold's town board since 2006. Previously he served for two decades as a town trustee, handling zoning and environmental permitting.

Walter, 46, of Wading River, is a real estate attorney who was elected Riverhead supervisor in 2009. He'd served previously as deputy town attorney.

Both candidates had argued that they were best suited to protect the interests of the East End, which sometimes clash with those of more densely populated western districts.

"It is somewhat of a stunning defeat," Walter told supporters in Riverhead, as captured on a video posted to the site of a weekly East End newspaper. "We did everything that we could possibly do to win this race."

Krupski, who will add to the legislature's Democratic majority, which becomes 13-5, ran on his agricultural experience and his ability to pass laws on the all-Republican Southold board.

Walter, who would have become the sixth Republican in the legislature, had touted his work in streamlining Riverhead government and spurring a downtown redevelopment.

"The size of the victory was tremendous," said Suffolk Democratic chairman Rich Schaffer, "especially with the Republican makeup of the district."