Democratic political newcomer Sean Casten is projected to defeat six-term Republican Rep. Pete Roskam in Illinois' 6th District, according to NBC News, winning a House seat that many analysts predicted would favor a Democrat this year.

The district has been represented in Washington by a Republican since the 1970s. But in 2016, Hillary Clinton defeated Donald Trump there by 7 points, an early signal of the area's shifting electoral makeup.

The national Democratic Party listed Roskam as one of its earliest targets and spent heavily on the race to unseat him. NBC News projected that the Democrats would take back the House.

Early polls showed Roskam with a slim lead over Casten, a tech entrepreneur, but as the race neared Election Day, Roskam's lead vanished, and polls showed him trailing by a few points, but within the polls' margins of error.

Casten's campaign strategy of tying Roskam to President Donald Trump appears to have succeeded in a year when Trump has proved particularly polarizing to voters.