More than 40 people have been killed in a three-hour gun battle between government forces and a drug cartel at a ranch in the western Mexican state of Michoacan.

During the confrontation on Friday, 42 suspected gang gunmen and one federal police officer was killed.

It comes after previous attacks by the cartel in which 15 state police officers were killed and an army was shot down by a rocket launcher, the first time this has occurred in the country’s history.

42 members of the drug cartel have been killed along with one police officer (EPA)

Black smoke from vehicles set alight could be seen for miles around and photographs of the scene showed bodies lying in fields and on a blood strewn patio.

The region where the fire-fight occurred on Friday is near the border of Jalisco state, home to Mexico’s second-largest city, Guadalajara, and is a region that has been plagued by gang violence in recent years.

Rubido said the gunbattle began when soldiers, federal police and investigators went to investigate reports of armed gunmen appearing on a remote ranch. When the government forces arrived they came under heavy fire.

The federal police officer was attempting to assist a wounded colleague when he was shot.

Soldiers and federal police were involved in the gunfight (EPA)

Since March, the New Generation Cartel has killed more than two dozen police and soldiers, and has drawn the attention of embattled President Enrique Pena Nieto, who has struggled to corral drug violence in recent years.

Many in Mexico are still reeling from the suspected massacre of 43 students by a cartel-sponsored municipal police force last year. Despite gaining international attention, the disappearance has not been resolved.

In Michoacan state in January, police were accused of firing on 16 unarmed civilians. An investigation is on-going in that case.