Both candidates say they will increase financing to law enforcement agencies  Mr. Obama has said he would like to reinstate the COPS grants created by President Bill Clinton but abandoned by President Bush. Mr. McCain said he would eliminate Justice Department earmarks, calling them “the broken windows of the federal budget process.”

“As it is, funds distributed by the Department of Justice are too often earmarked according to their value to the re-election of members of Congress instead of their value to police,” Mr. McCain said.

Mr. McCain also favors tougher sentences for illegal immigrants who commit crimes and more federal money to help local agencies detain them.

Both candidates supported the Second Chance Act of 2007, which provides money for job training and for drug counseling and other re-entry programs.

Mr. Obama has emphasized civil liberties, sensitivity to racial inequality and tough penalties for the most violent felons. He was a state lawmaker when the Illinois police and prosecutors were under siege. In 2003, doubt was cast on the convictions of several Illinois death-row inmates leading to a death-penalty moratorium that is still in effect.

Some critics say Mr. Obama’s role in the death-penalty moratorium has been exaggerated. Christine Radogno, a Republican state senator, said that Mr. Obama took credit for work accomplished by Gov. George Ryan, a Republican who imposed the moratorium, pardoned a number of death-row inmates, and established a commission to study capital punishment.

“To claim that Barack was the impetus for those reforms is an overstatement,” Ms. Radogno said.

Recent disclosures have revealed that Chicago police officers had tortured suspects into giving false confessions.