Pennsylvania Attorney General Josh Shapiro (D) was projected to defeat Republican state Sen. Doug Mastriano to become the next governor of the Keystone State.

Fox and NBC News called the race.

Polls consistently showed Shapiro leading, often by double digits, throughout much of the general election race, and he held on to win and keep the governorship in Democratic control.

The race served as a stark contrast with the state’s Senate race between Lt. Gov. John Fetterman (D) and celebrity doctor Mehmet Oz (R), which polls showed as being consistently closer.

Shapiro’s victory will be seen as key to keeping abortion legal in Pennsylvania, as Republicans in the state legislature have backed restricting it and Mastriano sponsored a bill that would ban the procedure after six weeks of pregnancy.