Jon Gale held a substantial lead Wednesday in the three-way Democratic primary race for Cumberland County District Attorney.

With 98 percent of precincts reporting, Gale had 11,594 votes or 36 percent, followed by Frayla Tarpinian with 10,424 votes or 33 percent and Seth Levy with 10,055 votes or 31 percent of ballots cast on Tuesday.

The winner of Tuesday’s primary will face Republican Randall Bates, a defense attorney, and independent Jonathan Sahrbeck, a prosecutor in the District Attorney’s Office, in the November election to replace Cumberland County’s longtime, outgoing district attorney.

Republican Stephanie Anderson, who has held the post since 1990, announced late last year that she wouldn’t run again.

Gale, 54, of Portland, is a criminal defense lawyer and former prosecutor. Levy, 54, also is a Portland resident and criminal defense lawyer. Tarpinian, 37, of Windham, is a prosecutor for the Kennebec County DA.

The three-way Democratic primary race for Cumberland County Judge of Probate also remained close Wednesday.

Paul Aranson appeared to be headed toward a victory with 98 percent of the precincts reporting.

Aranson had 10,603 votes or 37 percent, while Charles Kahill had 9,620 votes or 33 percent and Rubin Segal had 8,650 votes or 30 percent.

This story will be updated.