Somalia-based terror group Al-Shabaab has claimed it killed dozens of Kenyan police and soldiers in a raid in Pandanguo in Kenya's Lamu County.

It is believed the group claimed responsibility for the attack, which occurred on Wednesday (5 July), via an affiliated news agency.

"Shahada News Agency, an Arabic media unit of the al-Qaeda branch in Somalia, reported on its social media accounts on July 5, 2017, that Shabaab fighters stormed the city, destroying government centres including police and communications stations, and inflicted dozens of casualties," the SITE Intelligence Group said in a statement seen by IBTimes UK.

Local news site Capital FM Kenya said at least two police officers and one militant were killed during the attack.

It quoted Coast Regional Police Chief Akello Odhiambo as saying the army managed to repeal several militants during a gun battle that lasted for hours.

"They razed down a police camp and destroyed a Safaricom mast, disrupting communication among the security personnel based in Lamu. The gun fight took over seven hours before security agents took over the area," said Odhiambo.

It is believed the militants then left to Somalia travelling in a police vehicle.

Al-Shabaab, which fights to overthrow the Somalia government, has often targeted Kenya in retaliation for the Linda Nchi military operation. The operation saw the deployment of Kenyan troops in Somalia to drive out the militants in 2011.

In May, the group claimed responsibility for an bomb blast that killed between five and seven policemen in southern Kenya.

In one of its deadliest attacks, the militants killed 148 people at a university college in Garissa in 2015. The terrorists claimed the attack was carried out as the university was "on Muslim land colonised by non-Muslims".

Al-Shabaab is also infamous for a mass shooting carried out at the Westgate Shopping Mall in Nairobi in 2013, when masked gunmen stormed the facility and killed at least 67 people.

Somalia's efforts to end militancy

Al-Shabaab Somalia hotel attack
A security officer guards a suspected member of the al-Shabaab, who was detained near the Mogadishu port after a suicide car bomb went off at the entrance of the port, in Mogadishu, SomaliaFeisal Omar/Reuters

Al-Shabaab, which means "the youth", is affiliated to both al-Qaeda and Isis terror groups. It controlled Somalia's capital Mogadishu and the southern region of the country from 2006 until 2011, when it was defeated by African Union peacekeepers.

Earlier this year, Somalia's president, Mohamed Abdullahi "Farmajo" Mohamed, declared war on Shabaab terrorists. He offered a 60-day amnesty period to militants to surrender and vowed to help them reintegrate into society.

The group, however, dismissed the declaration of war and rejected the offer of amnesty.

In June, Mohammed urged once again the militants to "take advantage" of the amnesty he had offered them and said Somalia will "show no mercy in dealing with Al-Shabaab".

Earlier this year, US President Donald Trump approved a plan to increase counter-terrorism strikes in Somalia. The new directives, approved in March, allow the US to "conduct legal action against al-Shabaab within a geographically-defined area of active hostilities in support of partner force in Somalia".

On 4 July, the US launched an air strike killing an unknown number of Shabaab militants. Another air strike conducted in June destroyed a key Shabaab base in the country.