More recently, a retired general, Juan Manuel Barragán Espinosa, was detained in February, accused of having leaked information to a drug gang. Another general, Manuel Moreno Avina, and several soldiers he commanded are on charges of murder, torture and drug trafficking in a border town in northern Mexico.

“There have been cases with military officials before, but I don’t think this many at once,” said Alejandro Hope, a private security analyst and a former Mexican government intelligence official. “There has been worry that the more you use the military the more corruption there will be, so one purpose of this could be to send a message.”

The arrests this week arose from an effort by the United States and Mexico to cripple a major drug gang funneling cocaine to the United States, the Beltrán Leyva organization, which culminated in a raid in December 2009 in which a primary leader, Arturo Beltrán Leyva, was shot to death.

It remained unclear why the generals were detained this week for reported acts of a few years ago, or whether there were more recent accusations of wrongdoing. Prosecutors have 40 days to present formal charges, and the generals’ lawyers have told local reporters they will be exonerated.

A senior Obama administration official said Friday the United States was not participating in the Mexican corruption case, but the official declined to say, citing longstanding policy, whether American law enforcement agencies were also investigating the generals.

Some analysts were curious about the timing of the arrests. General Ángeles appeared last week at a security forum organized by a nonprofit group with ties to the Institutional Revolutionary Party, whose candidate for president, Enrique Peña Nieto, is considered the front-runner. The general was critical of the government’s approach to the drug war, suggesting it lacked focus.

Mr. Peña Nieto, who was also at the forum, said the general had played no role in his campaign, though General Ángeles served in Washington in the early 1990s under a former ambassador, Jorge Montaño, who is now the party’s foreign affairs adviser and who has met with policy makers and analysts in recent weeks in Washington.