“What it signifies is a strategy of some criminal organizations who seek to terrorize society and paralyze the government,” he said last week. “The question is, should we persevere and go forward or simply hide in our offices and duck our heads. No way is the Mexican government going to back down in such a fight.”

The violence between drug cartels that Mr. Calderón has sought to end has only worsened over the past year and a half. The death toll has jumped 47 percent to 1,378 this year, prosecutors say. All told, 4,125 people have been killed in drug violence since Mr. Calderón took office.

But the steady drumbeat of police killings has caused more shock here. On Wednesday, for instance, the second in command of the police in Morelos State and his driver were found dead in the trunk of a car. A placard on the bodies warned against joining the Sinaloa Cartel.

Several terrified local police chiefs have resigned, the most recent being Guillermo Prieto, the chief in Ciudad Juárez, who stepped down last week after his second in command was killed a few days earlier.

“It is not just happening in Ciudad Juárez,” Mayor José Reyes Ferriz, said at the funeral for the deputy commander, Juan Antonio Roman García. “It’s happening in Nuevo Laredo, in Tijuana, in this entire region. They are attacking top commanders to destabilize the police.”

One reason for the surge in violence is that Mr. Calderón and his public security minister, Genaro García Luna, have upset longstanding arrangements between the police and drug traffickers at every level of government, several experts on crime in Mexico said.

Last year, Mr. García Luna removed 284 federal police commanders across the country, replacing them with his own handpicked officers, many from outside the force, who had been trained at a new academy and who had been closely vetted for signs of corruption.