The country’s information ministry said in a statement late on Sunday that the operation that killed Nadir happened on Saturday.
It said he was al-Shabab’s chief prosecutor and was in line to replace the group’s leader, Ahmed Diriye, who is sick.
“His death is a thorn removed from the Somali nation,” the statement said.
“The government is grateful to the Somali people and international friends whose cooperation facilitated the killing of this leader who was an enemy of the Somali nation.
In recent weeks, Somali security forces have touted gains made against the al-Qaeda-linked group while fighting alongside local self-defence groups.
But al-Shabab has continued to conduct deadly raids, including two last Friday that killed at least 16 people.
Since 2006, the group has killed tens of thousands of people in bombings in its fight to overthrow Somalia’s Western-backed central government and implement its interpretation of Islamic law.
Somalia’s President Hassan Sheikh Mohamud, elected by lawmakers in May, has promised to take the fight to the rebels after three years in which his predecessor, consumed by political infighting, took little action against al-Shabab.
In August, Mohamud appointed a former al-Shabab spokesman Muktar Robow into his new cabinet.
Somalia’s military is supported by U.
S. troops and drones and an African Union peacekeeping mission.
It was not immediately clear which international partners participated in the operation that killed Nadir.