Mexico's efforts to get to grips with spiralling drug crime and corruption suffered a blow at the weekend when one of the country's top police officers resigned amid allegations that drugs cartels had infiltrated his department.

Gerardo Garay, the head of Mexico's military-style federal police force, stepped down to head off suspicion that he was working for a major drugs cartel. "I am resigning because the bloody fight against organised crime makes it our duty to strengthen institutions, which means it is essential to eliminate any shadows of doubt regarding me," Garay told a press conference. "I will put myself at the disposal of the judicial authorities." He denied any wrong in the federal police force, and an official statement from the chief prosecutor's office at the weekend indicated he is not under investigation.

But the decision is the latest episode in the government's desperate battle to control the drug gangs who have been infiltrating Mexico's security forces as one prong of their strategy within an increasingly no-holds-barred organised crime war.

Press reports have linked one of Garay's closest lieutenants to the Sinaloa cartel, which is a major protagonist in the drug wars. On Saturday the daily newspaper Reformer said the federal police had effectively "sold" control of the customs operations at Mexico City's international airport to the gang. So-called "narco banners" have also recently accused Garay of protecting Sinaloa-associated drug lords. Narco banners are propaganda messages purporting to be from different trafficking organisation that usually seek to discredit a rival gang, and are often hung from pedestrian bridges over major roads.

Mexico's deepening drugs crisis started four years ago as a fairly straightforward, if brutal, competition between different gangs. They are fighting for control of routes for trafficking cocaine from Colombia, as well as a growing domestic users market.

Then a military-led crackdown launched by President Felipe Calderon in December 2006 both complicated who was fighting who, and triggered a dramatic escalation of the violence. Execution-style murders have risen to close to 4,000 so far this year, including dozens of decapitations as well as a growing number of civilian victims with no obvious association with either drug trafficking or the security forces.

Some analysts believe the cartels have also increased the amount of effort and funds dedicated to corrupting the authorities.

This is not the first time the federal police have been under suspicion. Garay took over as acting commissioner of the force six months ago, after his predecessor was killed by a hired assassin outside his parents' home in Mexico City. The gunman not only knew the supposedly secret movements of the police chief; he also had a key to the external door.