BINGHAMTON, N.Y. — A Republican state senator felled in a corruption investigation. A respected local Democrat running to replace him. An enthusiastic governor, also a Democrat, backing her campaign.

In a different year, or a different part of New York, those ingredients might have added up to a bonanza for Democrats. The party has aimed to take control of the State Senate in the 2016 elections, with a presidential campaign pulling voters to the polls and Republican incumbents on the defensive over a wave of ethics investigations targeting the Legislature.

But the special election in the economically distressed Southern Tier region along the Pennsylvania border has instead become an early barometer of voters’ disgust with state government — and perhaps a reality check for Democrats who hope to compete in rural parts of New York in 2016.

To compete after the resignation of Senator Thomas W. Libous, who was convicted in July of lying to federal investigators, both parties drafted candidates who have positioned themselves as political reformers. Barbara Fiala, 71, a former Broome County executive who served in Gov. Andrew M. Cuomo’s cabinet, seemed to give Democrats their best chance to compete in the conservative-leaning district.