Incumbent Democrat Dan Lipinski won a narrow victory after a fierce challenge from progressive Marie Newman on Tuesday in Illinois’s third congressional district. With 95% of the vote reporting, Lipinski, one of the few remaining anti-abortion Democrats on Capitol Hill, edged out Newman by 51% to 49%.

A seven-term incumbent, Lipinski had not faced a serious challenge in a decade. However, in a district that backed Hillary Clinton by 15 points in 2016, he faced criticism not just for his views on abortion but his opposition to the Affordable Care Act and refusal to endorse Barack Obama in 2012.

The race drew national attention as Newman was backed by a number of major players in the Democratic party including Emily’s List, the Human Rights Campaign and SEIU. She also received the support of national political figures including Kirsten Gillibrand and Bernie Sanders while touting her support for crucial progressive priorities such as Medicare for All and a $15 minimum wage.

In contrast, Lipinski relied on support from local labor unions as well as the remnants of the “Democratic machine” in Chicago. He also received last-minute help from Susan B Anthony’s List, an anti-abortion group.

Newman refused to concede on election night, telling supporters she “would like Mr Lipinski to have a very painful evening”.

Before winning the seat in 2004, Lipinski’s father had represented the district for 11 terms and ensured his son was his successor through complicated political machinations.

The district, which includes part of Chicago as well as its south-western suburbs and exurbs, split on geographic lines. Lipinski won inside Chicago city limits but trailed Newman outside the city.

In an interview with the Guardian, Ilyse Hogue, the head of the influential pro-choice group Naral, which backed Newman early on, said the group had “made the race a top priority”. She noted that it “sent a message” that “it is neck and neck where you have someone who is virtual unknown against a sitting incumbent whose family has had the seat for 36 years”.

Newman echoed this message, telling the Guardian Lipinski was too conservative for the district: “He’s to the right of most Republicans.” She also criticized her opponent for “living on the coattails of his father” and claimed “he doesn’t work hard”.

Marie Newman speaks at her election night rally in Chicago. Photograph: Kamil Krzaczynski/Reuters

Lipinski repeatedly painted his opponent as part of a “Tea Party of the left” who was trying to divide a party that should be “focused on bread-and-butter issues”.

The longtime incumbent also focused on his position as a senior Democrat on the House transportation and infrastructure committee to tout his efforts to bring federal money to the district.

Lipinski is virtually certain to win in November. The Republican candidate, who ran unopposed, is a neo-Nazi and a Holocaust denier.

Illinois featured other competitive races at the top of the ticket. In the Democratic primary for governor, billionaire JB Pritzker held off progressive Daniel Biss and political scion Chris Kennedy after spending $70m of his own money. With 95% of precincts reporting, Pritzker had 46% while Biss had 26% and Kennedy had 24%.

On the Republican side, incumbent Bruce Rauner held off an underdog challenge from state representative Jeanine Ives. Rauner, who was facing a tough re-election bid after barely winning in the Republican wave in 2014, had alienated conservatives by signing a bill to expand public funding for abortions in an attempt to woo social moderates. He had previously pledged to veto similar legislation.

Ives attacked Rauner as a sellout in a controversial ad that was condemned by the Illinois Republican party “for rhetoric that attacks our fellow Illinoisans based on their race, gender or humanity”. With 95% of precincts reporting, the incumbent eked out a win by 52% to 48%.