According to military and local authorities, the shoot out took place when soldiers swooped down on the Zetas drug gang and killed seven of the gang members.
The other five where killed when they tried to escaped the ranch. A bystander was also killed in the encounter.
"So far we have 12 dead confirmed. Eleven were drug gang members and one was a civilian," a police source said.
The incident is one of the highest death toll resulting out of drug war.