HARRISBURG, Pa. (AP) — Democrat Josh Shapiro has won a second term as Pennsylvania’s attorney general, the top-ranking law enforcement position in the state.

Shapiro beat back a challenge from Republican Heather Heidelbaugh, a lawyer from Pittsburgh. Shapiro is a former state lawmaker and Montgomery County commissioner.

During his first term in office, he released a grand jury report into decades of child molestation by priests in the state’s Roman Catholic parishes.

Shapiro is widely viewed as a likely candidate for governor in two years.