JOHANNESBURG — The American military on Saturday said it had carried out its deadliest airstrike in Somalia in months, killing 52 Shabab extremists after a “large group” mounted an attack on Somali forces.

The United States Africa Command said the airstrike occurred near Jilib, a town not far from the East African coast, in the Middle Juba region. There were no reports of Americans killed or wounded.

The statement did not say whether any Somali forces were killed or wounded by the extremists, who are linked to Al Qaeda. The Shabab, via its Shahada news agency, asserted that its attack on two Somali army bases killed at least 41 soldiers. It described the location as the Bar Sanjuni area near the port city of Kismayo.

There was no immediate comment from Somalia’s government.

The Shabab controls large parts of rural southern and central Somalia and continues to carry out suicide bombings and other attacks in the capital, Mogadishu, and elsewhere.