Democratic Attorney General Josh Stein won North Carolina’s election for governor on Tuesday, defeating Republican Lt. Gov. Mark Robinson. Stein succeeds term-limited Democratic Gov. Roy Cooper. He previously served in the state Senate and earlier as head of Cooper’s consumer protection division when Cooper was attorney general. Stein’s campaign flooded the airwaves with anti-Robinson ads about Robinson’s past inflammatory comments. Robinson’s campaign also faced upheaval after a CNN report alleged that he made explicit posts years ago on a pornography website’s message board. Robinson denied the allegations. Democrats have now won eight of the state’s past nine gubernatorial elections. The Associated Press declared Stein the winner at 8:50 p.m. EST.