A group of heavily-armed al-Shabaab militants attacked a military base in Kenya before dawn Sunday, killing three Americans and destroying several planes, U.S. and Kenyan officials said. The attackers were killed after an hours-long gun battle.

The assault began at 5:30 a.m. local time on Sunday when at least 5 militants tried to breach security at Manda Air Strip next to Camp Simba, which is located along the coast in Lamu county, near the border with Somalia. Explosions were heard and residents said gunfire continued for more than 4 hours.

U.S. Africa Command confirmed that three Americans were killed in Sunday’s attack, including 1 U.S. service member and 2 Department of Defense contractors. Two other Americans were injured. Colonel Paul Njuguna, a spokesman for Kenya’s Defense Forces, said 5 attackers were killed.

“The attack on the compound today involved indirect and small arms fire. After an initial penetration of the perimeter, Kenya Defense Forces and U.S. Africa Command repelled the al-Shabaab attack,” the U.S. military said in a statement. “Reports indicate that six contractor-operated civilian aircraft were damaged to some degree.”

The al-Qaeda affiliate al-Shabaab claimed responsibility for Sunday’s attack.

“An elite group of soldiers from Harakat Al-Shabaab Al Mujahideen’s ‘Martyrdom Brigade’ launched a daring dawn raid on a U.S. naval base known as ‘Camp Simba’ in Lamu County,” al-Shabaab said in a statement. “The base is home to hundreds of U.S.military personnel and Kenyan soldiers and serves as one of the many launch pads for the American crusade against Islam in the region.”

Al-Shabaab is seeking to control Somalia to impose a strict interpretation of Sharia law. The militant group seized most of southern Somalia in the second half of 2006, but it later lost ground and pledged allegiance to al-Qaeda. Its senior leaders are believed to have trained and fought in Afghanistan.

On December 28, al-Shabaab carried out a suicide truck bombing along a busy road on the outskirts of the Somali capital Mogadishu, killing at least 85 people and injuring more than 100 others.

The U.S. military frequently carries out airstrikes against al-Shabaab, killing more than 300 militants in 2018 alone. In November 2017, more than 100 militants were killed when a U.S. airstrike targeted an al-Shabaab training camp in southern Somalia.