A former assistant prosecutor on Tuesday won a five-way Democratic primary for district attorney, making him the heavy favorite to win in November and become the first black DA in the city’s history.

The victory for Seth Williams comes four years after he lost in a challenge to his former boss, longtime DA Lynne Abraham. Williams had more than 42,400 votes, or 42 percent, with about 90 percent of precincts reporting.

“I’m very humbled by the support of the Philadelphia voters. They’ve chosen hope over fear,” Williams said in an interview with The Associated Press. “I look forward to working with the police, the courts, elected officials, community members.”

Williams, 42, bested four other seasoned attorneys, all of whom have experience in the DA’s office.

His nearest competitor, Dan McCaffery, conceded earlier Tuesday night. He had about 30,000 votes, or 30 percent.

In 2005, Williams got about 45 percent of the vote when he challenged Abraham, who’s white. Abraham, who has been DA since 1991 and been dubbed “America’s deadliest DA” for her support of the death penalty, is not running again.

The DA’s office has struggled to rein in gun violence, much of it involving young, black males. Abraham also has struggled to encourage reluctant witnesses and confront pay-to-play corruption.

Williams said he wants to create a system in which prosecutors are assigned to neighborhoods in a bid to gain the trust of communities and prevent so many cases from being thrown out for lack of evidence — especially the reluctant witnesses who are part of a mentality deemed “stop snitching.”

The primary comes at a difficult time for the office, with Philadelphia facing an estimated $1.5 billion, five-year budget deficit.

Williams served as the city’s inspector general from 2005 until last year.

McCaffery is the brother of state Supreme Court Judge Seamus McCaffery and the son of Irish immigrants. McCaffery, who has strong union backing, served in the DA’s office from 1991 to 1996 and has worked in private practice for more than a decade.

Daniel McElhatton, who was a Philadelphia city councilman for one term from 1992 to 1996, got about 14,700 votes, or 15 percent.

Two other candidates were considered long shots.

Michael Turner, who also is black, served as an assistant in the office before Abraham. He got about 8,800 votes, or about 9 percent.

Brian Grady, who served as an assistant under Abraham, got about 4,500 votes, or 5 percent.

Williams will face little-known Republican Michael Untermeyer, who was unopposed.

“I think my chances are good, but I have to do all that I can to ensure that Philadelphians support me,” he said. “All Philadelphians want a safer city.”

Copyright 2009 The Associated Press.