Police have detained a man, Alejandro Ramirez Baez, in the shooting, the department said.

Calderon condemned the attack in a statement on his Web site.

"The government of Mexico expresses its deepest sympathy" for "the cowardly assassination of an exemplary official committed to the security of Mexican families," the statement said.

But Calderon said in his statement, "The Mexican government will re-enforce its head-on fight against crime," he said.

In January, Millan used similar words to describe the government's struggle against the drug cartels. "Our fight is head-on," he told CNN en Espanol. "The capacities of the Mexican state are aligned to break the structures of each cartel."

Millan was the second federal police official to be killed in a week. On Friday night, Roberto Velasco Bravo, the director of investigation for organized crime, was killed in a "brutal assassination," the U.S. State Department said.

"Mr. Velasco had a distinguished record on the front line of the battle against the narcotic cartels and we will miss him," U.S. Ambassador to Mexico Antonio O. Garza said in a written statement.

And on Wednesday, Saul Pena Flores, commander of public security for the border town of Juarez, was killed when an armed group attacked his vehicle, according to state-run Notimex.

In the western state of Sinaloa alone, 21 police and two members of the military have been killed in the past five months, according to the local government.

But the violence appears to be at its worst in northern Mexico, prompting the U.S. State Department to issue a travel warning for American citizens.

"Recent Mexican army and police force conflicts with heavily armed narcotics cartels have escalated to levels equivalent to military small-unit combat and have included use of machine guns and fragmentation grenades," said the warning, from last month.

"Armed robberies and carjackings, apparently unconnected to the narcotics-related violence, have increased in Tijuana and Ciudad Juarez," it said.

However, the State Department noted the attacks are "aimed primarily at members of drug trafficking organizations, Mexican police forces, criminal justice officials and journalists.

"There is no evidence, however, that U.S. citizens are targeted because of their nationality."

On May 5, Calderon touched on the issue, saying, "Mexico today suffers from an onslaught of crime, and that's one of our greatest enemies. Insecurity threatens the well-being and peace of our families, the health and future of our children and the development of our people."