WASHINGTON — The Pentagon acknowledged on Monday that an American military strike in Somalia more than a year ago killed two civilians and injured three more.

The announcement, by United States Africa Command, was a rare acknowledgment from the military of civilian casualties in its campaign against the Shabab extremist group in Somalia.

“Regrettably two civilians were killed and three others injured in a February 2019 airstrike,” Gen. Stephen J. Townsend, Africa Command’s top officer, said in a quarterly assessment report by the military on allegations of civilian casualties. “We are deeply sorry this occurred.”

For years, Africa Command had maintained that no civilians had been killed in American airstrikes and raids in Somalia, disputing charges from human rights organizations that President Trump’s decision to relax rules for preventing civilian casualties during American counterterrorism operations had led to more civilian casualties.