(CNN) -- Two high-ranking public officials were shot and killed in Mexico late Wednesday, making for four such attacks in the past two weeks. Three of the deadly assaults happened this week.
In Oaxaca state, Mayor Nicolas Garcia Ambrosio and Council Member Angel Perez Garcia were assassinated Wednesday evening in the city of Santo Domingo de Morelos, the government-run Notimex news agency reported.
A few hours later, gunmen shot and killed the deputy attorney general for the Mexican state of Chihuahua and one of her two bodyguards, the mayor of Ciudad Juarez said on Thursday.
La Linea, the armed wing of the Juarez Cartel, claimed responsibility for killing prosecutor Sandra Ivonne Salas Garcia, said Juarez Mayor Jose Reyes Ferriz.
Oaxaca is in southwestern Mexico and Chihuahua is in northern Mexico, on the border with Texas.
Two other political assassinations occurred in recent days.
Front-running Tamaulipas state gubernatorial candidate Rodolfo Torre Cantu and a state legislator were gunned down Monday morning near Ciudad Victoria.
Tamaulipas, also a a border state, has seen some of the bloodiest violence in Mexico in recent months as the Zeta and Gulf cartels fight for supremacy.
In Chihuahua, criminals shot and killed Guadalupe Mayor Jesus Manuel Lara Rodriguez on June 19 as his wife and child watched. He was a vocal opponent of the drug cartels.
Some observers say there's little doubt the assassinations are linked to the run-up to elections Sunday for 12 state governorships and municipal and state posts.
"Yes, at least some of this clearly is related to the elections," said Andrew Selee, director of the Woodrow Wilson Mexico Institute. "If you shoot somebody, it's because you don't want that person to arrive [in office]."
Samuel Logan, an expert on Latin American gangs and founding editor of the Southern Pulse intelligence report, said criminals are choosing which candidates they cannot tolerate.
"It's evidence of the reach that organized crime has in the political realm," Logan said.
With so many offices at stake Sunday, "you have so many possibilities for peddling influence," said Logan, who recently wrote a book on the Mara Salvatrucha gang of Central America and is working on a book about the Zetas, which has emerged as Mexico's most ruthless drug cartel.
"You have to settle the scores one way or another," he said. "If you don't work for us, we're going to kill you."
John Mill Ackerman, an author and professor at the National Autonomous University of Mexico's Institute of Legal Research, said he sees two possible scenarios.
"What the cartels need is government protection," Ackerman said. "They are ready to knock off anybody who refuses to reach an agreement with them or who agrees with the other group."
Ackerman said he has no way of knowing what happened in Tamaulipas.
Selee said he believes the fighting may have taken a toll on the cartels.
"There are several drug-trafficking organizations that are on the ropes and they are striking back," Selee said. "But without knowing the facts of these killings, it's hard to know."
Analysts and politicians say each case must be viewed independently.
"I don't know if you can connect all the dots to each other," Selee said.
"They are different criminal groups [who have committed the assassinations]," said Reyes, the Juarez mayor. "We can't say that they have reached an agreement in doing this."
Reyes knows better than most the dangers of serving as a public official in Mexico. In March, authorities discovered a decapitated pig's head wrapped in a blanket. In the macabre package, they found a death threat against Reyes.
The next Juarez mayor, who will be elected Sunday, will take office October 9. It's a date that can't come quickly enough, Reyes said with a nervous-sounding laugh.
Asked how he's dealing with the ever-present danger, he said, "With much caution."
The mayor said he is "taking all necessary precautions" and has offered protection to all the candidates in the city.
Chihuahua state and Ciudad Juarez, across the border from El Paso, Texas, have emerged as the major battleground among cartels seeking access to lucrative drug-running routes into the United States.
The Mexican federal government said in April that 22,700 people have died in the country since President Felipe Calderon declared war on the cartels shortly after taking office in December 2006.
Calderon's offensive was a major departure from the way Mexico dealt with drug cartels.
"There's no more wink wink, nod nod. Sell your drugs but make sure there's no blood on the streets," Logan said.
Nowhere in Mexico are the streets bloodier than in Ciudad Juarez, where there have been more than 4,300 slayings in less than four years. Juarez is the largest city in Chihuahua state, where the Juarez and Sinaloa cartels have been killing each other at a record pace.
The city of Guadalupe, where the mayor was killed earlier this month, is in Chihuahua. The deputy attorney general killed Wednesday night also worked in Chihuahua.
In February, gunmen ambushed the mayor of the Mexican municipality of Guadalupe y Calvo in southern Chihuahua state. Killed were Mayor Ramon Mendivil Sotelo and one of his bodyguards.
Even the police in Chihuahua don't feel safe. Juarez Police Chief Robert Orduna resigned in February 2009 after receiving death threats.
For an increasing number of officials in recent days, those threats have become reality.
"We are seeing for the first time a major uptick in the past few months against elected officials and candidates," Selee said. "It's related to the intensifying conflicts among the cartels."
Analysts agree that the violence will continue. And it doesn't much matter who is doing it, some say.
"I don't really care who claims responsibility for it," Logan said. "The bottom line is that this guy was killed."