North Carolina Supreme Court Associate Justice Robin Hudson will go on to face a challenger for her seat in November, despite being hit with attack ads in which she was accused of being soft on child molesters.

Hudson, a Democrat, survived Tuesday night’s three-way primary race with 42.5 percent of the vote.

The second-place Republican finisher, Mecklenburg County Superior Court Judge Eric Levinson, received 36.6 percent of the vote, and will face Hudson again in November.

Jeanette Doran, the former general counsel and executive director of the N.C. Institute for Constitutional Law, came in third with 20.9 percent of the vote, which puts her out of the race.

The N.C. Institute for Constitutional Law is backed by state Budget Director Art Pope, a major funder of conservative causes.

The race for Supreme Court Justice is traditionally viewed as non-partisan.

But this one got nasty when conservative groups poured nearly $1 million into an ad campaign that attacked Hudson’s 2010 opinion that child molesters should not receive retroactive punishment under a law that didn’t exist when they were convicted.

Hudson was described as “not tough on child molesters” in the attack ads, which outraged Democrats and some members of the legal community.