RALEIGH, N.C. — North Carolina Attorney General Josh Stein was elected governor on Tuesday, defeating Republican Lt. Gov.