Masked gunmen sprayed bullets from heavy automatic weapons as they fought the Mexican army on a bridge into the city.