Krasner defeated Philadelphia Municipal Court Judge Pat Dugan.
Dugan stepped down midway through his third term in 2024 to mount a challenge against Krasner for the Democratic nomination.
Krasner defeated Dugan in the May primary, but Dugan switched parties in August to run in the general election as a Republican.