Days after the Islamic State’s leader, Abu Bakr al-Baghdadi, and his heir apparent were killed in back-to-back attacks by United States forces in northern Syria, the group broke its silence on Thursday to confirm their deaths, announce a new leader and warn America: “Do not be happy.”

In an audio recording uploaded on the Telegram app, the Islamic State mourned the loss of Mr. al-Baghdadi, who led the organization for nearly a decade, and its spokesman, Abu Hassan al-Muhajir, who was killed a day after Mr. al-Baghdadi and who had widely been considered a potential successor.

The audio recording was the first word from the Islamic State confirming the death of its leader, which President Trump triumphantly announced on Sunday as a huge blow to the world’s most fearsome terrorist group.

Mr. Trump and Pentagon officials said Mr. al-Baghdadi had blown himself up with a suicide vest, also killing two children, after he had been cornered on Saturday in a dead-end tunnel during an American military raid in a northern Syrian village. Mr. al-Muhajir was killed on Sunday in an airstrike elsewhere in northern Syria.