Gunmen armed with machine guns have shot dead at least 17 party-goers in a pre-dawn attack outside the northern Mexican city of Torreon, officials say.

Authorities say the heavily armed attackers have also wounded 10 others after spraying bullets through a recreation centre in Coahuila state, near Mexico's northern border with the United States.

A source with the state police department said witnesses reported hearing members of the group yell "kill them all" before they opened fire.

The attack took place about 1.30am on Sunday (0630 GMT, 1630 AEST) at the recreation centre, a popular weekend retreat situated in an usually calm suburb among gardens and lakes. Authorities said they found more than 200 bullet casings fired from automatic weapons following the massacre.

Officials said most of the shooting victims were in their 20s and 30s.