(CNN) One man died in a hail of bullets as he traveled in the dark of night, flanked by bodyguards.

Another was shot dead in broad daylight as he met with people in a town square.

The Saturday slayings took place hundreds of miles apart and were apparently unrelated. But both victims -- Ambrosio Soto Duarte and Domingo Lopez Gonzalez -- had the same job titles: They were mayors of towns in Mexico.

Authorities say both killings are being investigated. But a group representing Mexico's mayors isn't waiting for more details about the attacks before it calls on government officials to take action.

In a statement Sunday , the National Association of Mayors said Mexico's government should create a system for providing stepped up security for local officials in light of the killings.

JUST WATCHED Local politicians targeted in Mexico Replay More Videos ... MUST WATCH Local politicians targeted in Mexico 02:25

Since 2006, when Mexico's government began a crackdown on cartels and violence surged in some parts of the country, 40 mayors have been killed, according to the association.

"The implementation of a protocol of protection for mayors at risk is urgent," the group's statement said.

Highway ambush

Soto Duarte was the mayor of Pungarabato, a small town in Mexico's Guerrero state.

The Mexican Pacific coast state is part of a region known as "Tierra Caliente" (Hot Land), a nickname that was once a reference to the climate but now has become nearly synonymous with drug-related violence.

In his last tweet, posted earlier this month, Soto Duarte warned he was being threatened.

"They killed my cousin, I am being threatened by organized crime. Now it is time to act, Mr. President. Tierra Caliente needs you," the tweet said.

Mataron a mi primo, estoy amenazado por la delincuencia organizada. Ya es hora de actuar señor presidente @EPN. #TierraCaliente lo necesita. — Ambrosio Soto (@BOCHOSOTO1) July 9, 2016

Just over two weeks later, Soto Duarte was dead.

Guerrero Gov. Hector Astudillo Flores told reporters Sunday that the mayor had received death threats, prompting him to request security for himself and his family beginning in January.

Around 10:30 p.m. Saturday, the mayor was riding on a highway in the neighboring state of Michoacan when two pickups stopped his car, Astudillo said

The mayor died in the shootout that followed, as did a suspect. Two police officers in Soto Duarte's security detail were injured, officials said.

According to local media reports, investigators found hundreds of shell casings at the scene.

Town square shooting

Lopez Gonzalez was mayor of San Juan Chamula, a town hundreds of miles away in Mexico's Chiapas state.

There's a long history of tensions between government officials and indigenous communities in that part of the country, which is where rebels formed the Zapatista National Liberation Army in the 1990s.

Lopez Gonzalez was talking with residents who were demonstrating in the town's main square around 7 a.m. Saturday when armed men shot at the crowd, state officials said

In addition to Lopez Gonzalez, four others were shot and killed , including the city's vice mayor.

Another 12 people were wounded, said Juan Carlos Gomez Aranda, the state's secretary of government.

The state attorney general's office is investigating, and officials have formed a committee to focus on bringing peace and unity to the town, Chiapas Gov. Manuel Velasco said in a video statement posted online.

"La violencia nunca será el camino". Posicionamiento del Gobierno de #Chiapas sobre los hechos en San Juan Chamula. pic.twitter.com/REGHt45a21 — Manuel Velasco (@VelascoM_) July 23, 2016

"Violence will never be the way to resolve differences," he said. "The call is always to favor dialogue and understanding."