Campaigning at an apple festival in Germantown on a recent Saturday, many of the people with whom Mr. Faso shook hands had known him, at least casually, for years.

“All I know about Zephyr Teachout is she was in the governor’s race at one point,” said Frank Santacroce, 78, a volunteer at the festival who chatted briefly with Mr. Faso. “It makes it tough to decide.”

Mr. Santacroce said he usually voted Republican, but was willing to cross party lines, although not in this case. “I know John Faso,” he said. “You have to say he’s a nice guy.”

A day earlier, at the Sanders rally for Ms. Teachout in New Paltz, Molly Franco, 21, a SUNY student, said that her sociology class, which usually met at that time, had insisted that their professor let them attend the rally. But Mr. Sanders was the draw. Without him, she said, “probably a couple people would come if they said it was extra credit.”

Ms. Franco said that she had not yet taken a close look at the congressional candidates, but that Mr. Sanders’s endorsement of Ms. Teachout could help persuade her.

The district is almost equally divided along party lines, with 135,193 active voters registered as Republicans and 132,818 registered as Democrats, according to the State Board of Elections. There is also a large contingent of independent voters, with 114,577 active voters holding no party affiliation.