A nighttime shooting attack on a hospital in northern Mexico has left four people dead, including a doctor, authorities said Friday.

The attack happened near midnight Thursday in the Sinaloa state capital of Culiacan. The state is home to the drug cartel of the same name.

State police said at least three gunmen tried to storm into the hospital, but two were killed in a gunbattle with security personnel. The doctor was apparently caught in the crossfire.

A third assailant was wounded, but scuffled with a police officer as he was being taken to another hospital. The wounded assailant grabbed the officer’s gun and shot himself with it, police said.

MASSACHUSETTS PARTY DESCENDS INTO DEADLY CHAOS WHEN SUSPECT OPENS FIRE IN 'TARGETED' ATTACK

FOX graphic Mexico

A doctor was caught in the crossfire and was among the four people who were killed in a gunbattle at a hospital in Mexico.  (Fox News)

CLICK HERE TO GET THE FOX NEWS APP

Local media reported that the gunmen stormed the hospital in order to finish off a patient who had been wounded in an earlier gunbattle. However, the state prosecutors' office said it couldn't yet confirm that.

Sinaloa has been the scene of fighting between various factions of the Sinaloa cartel, including the sons of imprisoned drug trafficker Joaquín "El Chapo" Guzmán, other relatives and the old-guard cartel boss Ismael "El Mayo" Zambada.

Attacks by drug cartel gunmen on ambulances and hospitals while hunting down wounded rivals have been a persistent problem in Mexico.