Three suspected drug-gang gunmen have been killed in a confrontation with community self-defense squads and federal police in the mountains of western Mexico.

The mayor of the town of Chinicuila says the suspects had been trying to steal residents' cars to flee the recent offensive by federal forces.

Mayor Justo Virgen Cerrillos said Wednesday that the suspects were among the cartel gunmen who have been hiding in the mountains after self-defense squads were formed by local residents earlier this year.

The suspects were confronted and killed by the vigilantes and police on Tuesday.

The federal government sent in thousands of soldiers and police in May to try to restore order after the Knights Templar drug cartel imposed a regime of extortion, kidnapping and killings in Michoacan.