Republicans also tried to frame the contest, with its expected low turnout, as a referendum on the Obama administration, despite the district’s atypical demographics and unique issues.
Democrats countered with cash and an aggressive get-out-the-vote effort. The Weprin campaign spent about $750,000 in TV ads, with the Democratic Congressional Campaign Committee — the fundraising arm of House Democrats — contributing about two-thirds of the amount, a senior Democratic aide said.
Mr. Weprin had raised almost $451,000 and had more than $202,000 in available cash as of Aug. 24, the latest campaign-finance records showed. Mr. Turner had raised about $204,000 and had almost $94,000 in cash during the same period.
The Democratic Party also enlisted two of its stars, former President Bill Clinton and Gov. Andrew Cuomo, to record phone calls for Mr. Weprin. And Democrats are relying on organized labor and other affiliated groups to bring voters to the polls.
But Mr. Weprin had some publicized missteps along the campaign trail. The influential New York Daily News immediately seized on a mistake he made in a meeting last month with its editorial board, which asked about the size of the national debt. Mr. Weprin’s answer of $4 trillion was more than $10 trillion short of the true number.
The Democrat then dropped out of a debate with Mr. Turner at the last minute, citing logistical problems owing to Hurricane Irene. But many thought the true motive for his no-show was embarrassment over the Daily News gaffe.
Mr. Weprin also upset many Orthodox Jews in the district for his support of a same-sex marriage bill while serving in the state Legislature.
The winner will fill the rest of Mr. Weiner’s term, which runs through January 2013. The Democrat resigned in June after he acknowledged he had sexually changed online relationships with several women.