Democrat Josh Gottheimer has defeated seven-term Republican U.S. Rep. Scott Garrett in New Jersey's closest-watched race.

The former Microsoft executive and Bill Clinton speechwriter toppled Garrett in the perennially Republican 5th District in northern New Jersey.

The campaign became bitter, with Gottheimer calling Garrett a bigot and Garrett calling Gottheimer a liar.

Gottheimer had broad support from Democratic officials, including U.S. Sen. Cory Booker. His supporters had hoped to capitalize on reports that Garrett would not contribute to the House Republican campaign arm because it backed gay candidates. Garrett rejected the claims and denied being anti-gay.

Gottheimer had a fundraising edge with $2.6 million to Garrett's $2.1 million.

The district includes parts of Bergen, Passaic, Sussex and Warren counties.