MEXICO CITY - Two men were killed in a brazen shooting in Mexico’s colonial city of San Miguel de Allende when gunmen opened fire on a funeral procession.

City police said five people were wounded in the attack Thursday. All were reported in stable condition.

Mayor Luis Alberto Villarreal wrote on Twitter: “We will not allow violence and crime here. There will be justice.”

The city is a popular tourist destination which had largely been spared the spate of violence, killings and extortions that have rocked other parts of the north-central state of Guanajuato.

The shooting occurred on the city’s outskirts, relatively far from the colonial-era churches and plazas downtown.

The gunmen opened fire on vehicles in the funeral procession, and appeared to target mourners and relatives of the deceased man.

In July, gunmen also killed two police officers on a street in San Miguel de Allende in broad daylight.

Guanajuato has been racked by violence and crime largely associated with criminal gangs that stole fuel from government pipelines. Since the government cracked down on fuel thefts earlier this year, the gangs have apparently turned to killings and extortion.

Retaliations by gangs against wounded — or even dead — rivals are not unheard of in Mexico. In April, the Mexican Red Cross briefly shuttered operations in Salamanca, Guanajuato, after a man wounded by gunfire was pulled from one of its ambulances by gunmen.