In the Democratic primary race for Baltimore City State's Attorney this year, long-time prosecutor Patricia C. Jessamy is facing her first serious challenge in eight years from Gregg Bernstein, a former federal prosecutor in the Baltimore U.S. Attorney's office and, more recently, a defense lawyer specializing in white-collar crime and financial fraud. He has mounted a credible critique of Ms. Jessamy's tenure and has offered concrete ideas for making the office better at its primary task, putting criminals behind bars. He earns our support in Tuesday's primary.

During her 15 years in office, Ms. Jessamy has compiled an admirable record in many respects, pushing prevention and treatment for low-level drug offenders, while targeting the most violent offenders for prosecution. She inherited her position in 1995 from former City State's Attorney Stuart Simms, and since then she has earned a reputation as a public servant of character and integrity.

But in recent years Ms. Jessamy's office has often seemed to be treading water, recycling the progressive reforms of the 1980s and '90s without being able to replicate their successes. The department too often has seemed directionless, overwhelmed by a crushing docket of major felony cases and ill-prepared to adapt to the challenge of a new generation of violent repeat offenders who have learned to manipulate the parole and probation process so they can remain free to commit more crimes. Many of the initiatives her office has adopted fail to achieve their goals because staffers are too harried to do the necessary follow-up work. At this pivotal time in the city's history, we think the department could benefit from new leadership and new ideas.

Mr. Bernstein is a smart, aggressive lawyer who is well respected in the legal community and who believes the state's attorney's office needs to make more strategic use of its limited resources. He has criticized Ms. Jessamy for the perception of her office as a "revolving door" that allows dangerous offenders to escape conviction or serious jail time. He says city prosecutors sometimes arrive in court unprepared and that the office needs to do more to make sure charges aren't dropped because of limited evidence or because victims and witnesses refuse to testify or disappear.

The city recently has witnessed a number of high-profile cases — such as the July 25 murder of Hopkins researcher Stephen Pitcairn or last year's shooting of 5-year-old Raven Wyatt — in which the suspects were able to commit heinous crimes only because they were out on probation or parole after prosecutors failed to convince a judge to return them to prison. In response, Mr. Bernstein has proposed policy changes that will allow the office to pursue more cases, a system of professional development to improve the courtroom performance of prosecutors and to personally take on high-profile cases. He wants to make greater use of technology — prosecutors don't have voicemail, much less BlackBerrys — and to seek more federal grants to expand the office's reach.

For her part, Ms. Jessamy has too often explained the failings of the system by criticizing police for gathering evidence properly, or judges for refusing to heed prosecutors' recommendations to put parole and probation violators back behind bars. But blaming others begins to wear thin when the same problems crop up over and over again. The state's attorney's office can't be blamed for all the failures of the criminal justice system, but it might win better outcomes in court if Ms. Jessamy had cultivated more cooperative working relationships with the police.

Ms. Jessamy deserves credit for many of the initiatives she has carried over from her predecessors or created on her own watch: the focus on illegal guns and the most violent offenders, setting up specialized units to deal with juvenile offenders, domestic violence and child abuse, and community forums so prosecutors can hear first-hand the concerns of neighborhood residents. She has also worked hard in Annapolis for tougher anti-gang laws and more resources to combat witness intimidation. But the focus on those activities seems at times to have robbed attention from the office's primary task of successfully prosecuting criminals. Other initiatives, such as the "War Room" meetings meant to identify the most violent offenders or working with parole and probation officials at the Central Booking and Intake Center to make sure dangerous offenders stay behind bars have faltered or died because of a lack of consistent follow-up.

Although violent crime has dropped in Baltimore recently, it's hard to say how much of the improvement can be directly attributed to the efforts of the state's attorney's office. People still don't feel safe in many parts of the city, and Ms. Jessamy's tense relationship with both the current and former Baltimore City police chiefs clearly has been counterproductive.

There are legitimate questions to be raised about Mr. Bernstein's relative lack of experience in managing a large office, but what has come to be too significant a focus in this election has been the issue of race. Mr. Bernstein is white, and Ms. Jessamy is black, and the incumbent has claimed that Mr. Bernstein would encourage a return to the policy of mass arrests, a policy many believe unfairly targeted African-Americans. That is not a realistic fear. Baltimore has tried every possible combination of white and black mayors and police chiefs, and it would be difficult to draw any correlation between race and effectiveness or strategy when it comes to public safety. We have turned away from the strategy of mass arrests under a white police commissioner appointed by a black mayor, not because of race but because the policy wasn't getting the job done.

The real question in this election is whether the status quo is good enough when it comes to pursuing what Police Commissioner Frederick H. Bealefeld III has called the city's No. 1 priority of getting bad guys with guns off the streets. Mr. Bealefeld perhaps unwisely injected himself in the race when he briefly displayed a campaign poster for Mr. Bernstein on his lawn. But the discussion over that action has focused too much on its propriety and too little on its relevance.

Mr. Bealefeld did express a widely shared frustration at the number of violent repeat offenders who manage to slip the law's grasp despite the best efforts of police to put them behind bars. Mr. Bernstein promises to bring new energy to the prosecutor's office as an independent, tough-minded prosecutor who will secure convictions and substantial prison terms against those who threaten the public safety. He is a determined reformer at a time when the city needs to shake things up in the prosecutor's office, and for that reason The Sun endorses Gregg Bernstein for Baltimore City State's Attorney.