Al-Shabaab has appointed a new leader, only days after Ahmed Abdi Godane was killed in an air strike south of Mogadishu. Photograph: Farah Abdi Warsameh/AP

Al-Shabaab, Somalia's Islamic extremist group, has named a new leader after confirming the killing of its previous leader by a US air strike, a commander of the group said.

The Somali militants unanimously selected Ahmad Umar, also known as Abu Ubaidah, at a meeting in an undisclosed location in Somalia, said rebel commander Abu Mohammed.

Al-Shabaab also stated that it remains aligned with al-Qaida, according to the Site intelligence group, that monitors statements by Islamic militant groups.

There had been speculation that al-Shabaab would be shaken by a power struggle over the selection of a new leader and that perhaps the Somali rebels would change alliance and become allied to the Islamic State group.

The Somali group had to appoint a new leader following the death of Ahmed Abdi Godane, who was killed with two others by a US air strike on Monday. The attack took place 105 miles south of Mogadishu, where al-Shabaab trains its fighters.

"Avenging the death of our scholars and leader is a binding obligation on our shoulders that we will never relinquish nor forget, no matter how long it takes," said the al-Shabaab statement, according to Site.

President Barack Obama confirmed on Friday that Godane was killed by the US air strike. The US state department declared al-Shabaab a terrorist organisation in February 2008.

Godane was also known as Mukhtar Abu Zubeyr and was the spiritual leader of the al-Qaida-linked group. The US had offered a reward of up to $7m (£4.3m) for information leading to his arrest. Godane had publicly claimed al-Shabaab was responsible for last year's deadly Westgate Mall attack in Nairobi, Kenya, that left 67 people dead.

Somalia's government said that it has credible intelligence al-Shabaab is planning attacks in retaliation for Godane's death.

In a televised speech, General Khalif Ahmed Ereg, Somalia's national security minister, said possible targets include medical and educational institutions. Ereg said the government is vigilant and its armed forces are prepared to prevent such attacks.

The killing of Godane was a "delightful victory", said Ereg. He called on militants still fighting for al-Shabaab to surrender to get a "brighter" life from the government.

Uhuru Kenyatta, the Kenyan president, thanked the US for killing Godane, saying his death provides "a small measure of closure" for victims of the Westgate Mall attack. Kenyatta's nephew and his fiancée died in that attack.

Godane, who used a number of other aliases, led the planning and was responsible for the perpetration of the attack on Westgate, Kenyatta said.

"We owe the United States, and its soldiers, our heartfelt thanks for bringing an end to Godane's career of death and destruction; and finally allowing us to begin our healing," he said.

"His death is a stark reminder that those who live by the sword shall perish by the sword," Kenyatta said.

Al-Shabaab has vowed to revenge the presence of Kenyan troops in Somalia. Kenyan troops went into Somalia in October 2011 to fight al-Shabaab, which is blamed for cross-border attacks and kidnappings of westerners on Kenyan soil.

Kenya later became part of the African Union force that is bolstering Somalia's weak UN-backed government against al-Shabaab's insurgency.