O'Malley, the Democrat, describes public safety as "the foundation of everything," and his zero-tolerance arrest policy as mayor of Baltimore helped to position him as a law-and-order candidate for governor four years ago.
Ehrlich, the Republican, likes to remind voters of the controversial policy, which critics say resulted in the arrests of innocent people, and which was particularly unpopular with the African-American voters both campaigns covet.
"If you assist in doing justice, you're doing the job as governor," Ehrlich said.
Both lawyers by trade with family ties to law enforcement, Ehrlich and O'Malley have championed many of the same ideas: improving the state's criminal DNA database, protecting witnesses to crime, strengthening laws targeting sexual predators and reforming juvenile justice.
In other areas, the governors have distinct differences. Ehrlich supports the death penalty; O'Malley worked to eliminate it. O'Malley has not granted parole to anyone with a life sentence; Ehrlich maintained a robust clemency program.
O'Malley says he has given police officers better tools to do their jobs by improving agency-to-agency communication and crime analysis. Last week, the Board of Public Works approved an interoperability contract that will enable emergency workers to better stay in touch in emergencies.
Baltimore Police Commissioner Frederick H. Bealefeld III and other police leaders have said the level of cooperation between local officers and state agencies has improved greatly under O'Malley.
Ehrlich, however, has won praise from police officers for refusing to furlough state employees; last week, the Maryland Fraternal Order of Police formally endorsed him.
"Officers do a great job, as evidenced by the lower crime rate, but it's hard for them when they take home less pay than they did four years ago," said retired Prince George's County Police Officer Rodney Bartlett, president of the FOP.
Ehrlich says he would reinstate the death penalty, which O'Malley has effectively halted. At the same time, Ehrlich says, he would restart a review process for lifetime prisoners whom the parole commission believes are deserving of parole. He says he would return his focus to the juvenile justice system, which has struggled with high recidivism rates and security problems under both governors.
O'Malley, too, vows a renewed commitment to juvenile justice, a department reeling this year from the beating death of a teacher at the Cheltenham Youth Facility and a subsequent audit showing disarray throughout the department. O'Malley says he wants to "set no limits" on how much the state can reduce crime.
Maryland's homicide rate reached a 35-year low last year as violent crime nationwide continued to decline. A report published in April by CQ Press ranked the state the eighth most dangerous in the nation; it ranked second in murder and robbery.
O'Malley says Maryland is helping to lead the national decline through its innovations.
A governor can do "a huge amount," he said. He adapted the data-driven, hands-on approach he developed as Baltimore mayor, reviewing homicide and accident tallies from across the state each morning.
O'Malley's wife is a Baltimore District Court judge; his father was a Montgomery County prosecutor. O'Malley began his career as a city prosecutor and was elected mayor on a crime-fighting platform. He says he became "obsessed" with crime as a city politician.
Ehrlich's wife was a public defender, and his grandfather was a city police officer. Ehrlich himself was a congressman on Sept. 11, 2001, and was inaugurated governor in 2003, as state and national leaders responded to new homeland security concerns.
His administration came under fire for lapses in port security; in 2005, the Coast Guard and the U.S. Department of Homeland Security listed the Port of Baltimore among the most susceptible to terrorist attack. Among the problems: "decoy" surveillance cameras that were actually wooden boxes on fence posts.
For the past two years, the port has received near-perfect scores for security. "It's not some fantasy security, but real security," O'Malley said.
Other homeland security measures have done double duty for public safety, O'Malley says.Biosurveillance meant to help in the event of an attack worked well during the flu pandemic, he says, and license-plate readers that scan for terrorists also help authorities find stolen vehicles.
The candidates have taken some party-line-crossing positions on prison services. Ehrlich refers frequently to "savables," and identifies RESTART, a program that provides inmates with education, counseling and reentry services from the moment they enter prison, as one of his greatest criminal justice accomplishments.
He acknowledges that his "focus on the treatment regime runs counter" to the priorities of many fellow Republicans.
O'Malley, meanwhile, has called RESTART a dangerous diversion of public safety dollars away from security. He says he prefers to view prison, parole and probation and juvenile services primarily as law enforcers, rather than as service agencies.
He says he has sharpened the focus of parole and probation so that agents now devote the most time to the most dangerous people.
"We used to supervise so many people so little that we effectively supervised no one," he said. "Now we supervise very intensely a smaller number of really high-risk offenders and are constantly improving our ability to send them back to jail as quickly as we can when they reoffend or violate the terms of their probation."
Both candidates tout their judicial nominations.
Ehrlich says he is proud to have appointed a nearly equal amount of Democrats and Republicans to the bench. O'Malley has appointed few Republicans, a record Ehrlich called "inappropriate."
"He has taken it back to the way it used to be before me — very partisan," he said.
O'Malley says he focuses on law and order when interviewing judicial candidates.
"I always ask, 'If someone comes before you and you find them guilty of a crime of violence or a crime involving a handgun, will you have the guts to send them to jail to protect the rest of us?' "