WASHINGTON — After denying allegations last month that United States airstrikes had killed civilians in Somalia, the American military said on Friday that an April 2018 attack left two people dead.

The announcement comes after Gen. Thomas D. Waldhauser, the head of Africa Command, ordered a review of all airstrikes conducted in Somalia since 2017.

The internal assessment was prompted by pressure from lawmakers and an Amnesty International report released last month that found evidence of five strikes in Somalia that had killed more than a dozen civilians.

The two civilians were killed in an April 2018 airstrike against the Islamist extremist group Shabab near El Buur, a town in central Somalia. In a statement on Friday, Africa Command said it “found credible evidence” of the deaths shortly after the strike, but the casualties were not reported to senior officials until last week.