NAIROBI, Kenya — Eight Kenyan police officers were killed when their vehicles ran over improvised bombs in two separate incidents near the border with Somalia, officials said Wednesday.

The dead included a personal bodyguard for a local governor whose convoy was targeted in what officials said was the seventh assassination attempt on the governor’s life.

The deaths came a day after Kenya’s police chief Joseph Boinnet announced that al-Shabab extremists based in Somalia were stepping up attacks inside the country. He said al-Shabab is under pressure from African Union troops supporting Somalia’s government, which recently declared a new offensive against the extremist group.

Al-Shabab claimed responsibility for the attacks on the governor’s convoy and said seven Kenyan police officers were killed, according to the SITE Intelligence Group, which monitors extremist groups.

In the first incident, a police vehicle heading toward the border town of Liboi was blown apart by an improvised explosive device, North Eastern Regional Coordinator Mohamud Saleh said.

Later Wednesday, the governor of Mandera County, Ali Roba, said in a Facebook posting that five members of his security detail were killed when their vehicle was struck by a bomb. The dead included his personal bodyguard.

Two other officers were injured in the attacks.

The Council of Governors said it was the seventh attempt to kill Roba in a span of three years. Governor Joseph Nanok, the council’s chairman, called on the interior ministry to take the attempted assassinations and deaths of residents in Mandera from al-Shabab attacks seriously.

Local reporter Manase Otsialo, who was in the governor’s convoy, said the vehicle in which the governor was riding was behind the one that was blown up.

Al-Shabab, which has ties to al-Qaida, claimed responsibility for the first attack in a report by its news agency, saying it had killed at least five Kenyan police officers, according to the SITE Intelligence Group, which monitors extremists.

In the last two weeks, attacks by al-Shabab in Kenya’s Garissa and Mandera counties have increased after a lull. Last week, an improvised bomb killed four people in a vehicle, including a child.

Mandera County has been hardest hit in recent years by an al-Shabab campaign to avenge Kenyan troop presence in Somalia since 2011. Kenya’s troops are part of the AU force there.

Kenya has managed to stop the frequency of al-Shabab attacks in its capital, Nairobi, and major towns, but human rights groups say the government uses methods such as extrajudicial killings that can fuel revenge attacks.