KARACHI, Pakistan — Seven police officers keeping watch over a polio vaccination campaign were gunned down in two separate attacks in a suburb of Pakistan’s southern port city of Karachi on Wednesday, government officials said.

The attacks occurred in a poor neighborhood of Orangi Town, where health workers have been administering vaccinations.

There was no immediate claim of responsibility and police officials said they were investigating whether the attacks were connected to the immunization campaign.

Taliban militants have repeatedly targeted health workers in the past, accusing them of being spies, and the violence has seriously hindered immunization campaigns in Pakistan, which is one of three countries in the world where polio remains endemic. But Karachi itself has a long history of political and sectarian violence, and criminal gangs have also been known to kill police officers.