The seven Democrats running in Tuesday's primary election for district attorney in Philadelphia agree that the office they seek is in crisis and in critical need of reform.

They just disagree on who could best address those challenges.

That race tops a primary ballot that includes a spirited Democratic contest for city controller, city judicial races for Municipal Court and Common Pleas Court, and statewide races for Commonwealth Court, Superior Court, and the Supreme Court.

District Attorney Seth Williams dropped his bid for a third term in February, was indicted by a federal grand jury in March, agreed in April to the suspension of his law license while shrugging off calls for his resignation, and had new federal charges added to his case last week.

Williams won a competitive 2009 race as a reformer, but has seen that record undone by allegations of corruption involving his troubled personal finances.

The city's Democratic Party never unified behind a candidate to replace Williams. Months of candidate forums revealed little disagreement among the contenders on issues like ending cash bail for nonviolent offenders, pushing treatment instead of incarceration for those with drug addiction, and helping inmates released from prison reenter society.

On the death penalty, which has been under a moratorium since 2015 in Pennsylvania, Larry Krasner, Tariq El-Shabazz, and Rich Negrin said they would not pursue death sentences. Joe Khan, Jack O'Neill, Teresa Carr Deni, and Michael Untermeyer said they would seek such a sentence only in extreme and heinous cases.

One example of how diffuse Democratic support is among the candidates emerged in the closing days of the race.

Local 98 of the International Brotherhood of Electrical Workers, a political powerhouse that fuels campaigns with contributions and Election Day ground troops, made its first donation in the race Saturday.

The union gave $10,000 to El-Shabazz, a former first assistant district attorney who had trailed some of the other six candidates in fund-raising.

The same union on Monday was running ads on praising the prosecutorial work of O'Neill, a former assistant district attorney.

Frank Keel, a Local 98 spokesman, said the union had not formally endorsed El-Shabazz, O'Neill, or any other candidate.

The union has drawn the interest of federal investigators. The Inquirer and Daily News on May 2 reported that those investigators were looking into $6,400 Local 98 paid in 2015 to send Williams' two daughters to summer camp abroad.

Many of the Democratic City Committee's 69 ward leaders are backing different candidates or remaining neutral.

Into that void came crashing a $1.45 million contribution by billionaire George Soros of New York to Philadelphia Justice and Public Safety, an independent political action committee airing television commercials and sending out canvassers in support of Krasner, a defense attorney known for civil rights cases who has never worked as a prosecutor.

Another independent political action committee, Building a Better Pennsylvania Fund, reported over the weekend spending money in support of O'Neill and in opposition to Krasner. That PAC, founded by Local 98 in 2014, is funded by local building trades unions.

Krasner's rise in the field drew the fire over the weekend of Khan, a former city and federal prosecutor, who released a letter from 24 former District Attorney's Office employees who endorsed him, in part because of their concern that Krasner has never been a prosecutor.

That, in turn, prompted the release of a letter Monday from 25 "Philadelphia survivors of sexual violence" who declared their support for Krasner and decried "recent attacks" on his campaign.

Khan pronounced the primary "a two-person race" after releasing on Friday a poll his campaign commissioned showing him and Krasner tied in first place with 20 percent each of likely Democratic voters, with an additional 22 percent undecided.

Khan's poll, unchallenged by any other campaign, listed Negrin, a former city managing director, in third place with 14 percent; Untermeyer, a former city and state prosecutor, in fourth place with 12 percent; El-Shabazz in fifth place with 7 percent; and O'Neill tied at 3 percent with Deni, a former Municipal Court judge.

Beth Grossman, a former assistant district attorney, is the lone Republican on the ballot. She will face the Democratic winner in the Nov. 7 general election.

In the race for city controller Alan Butkovitz, a Democrat seeking a fourth term, is challenged by Rebecca Rhynhart, who served as chief administrative officer for Mayor Kenney after working for eight years in various posts for former Mayor Michael A. Nutter.

Rhynhart has branded Butkovitz, a ward leader, as "beholden to the political machine" in the city. Butkovitz has accused her of being a "put-up candidate" running at the behest of Nutter, who has frequently clashed with the controller.

Republican Michael Tomlinson is his party's lone candidate for controller.