Hammami was highly critical of Shabab's leadership over the past year and freely shared his views in Internet videos and on Twitter, making him a marked man.
Somalia has been an attractive destination for foreign fighters, and about two dozen Somali-Americans from Minneapolis have joining al-Shabab in the past several years. Hammami's death will hurt the group's recruitment efforts, said Abdirizak Bihi, an advocate for the Somali community in Minnesota and the uncle of a young man killed in Somalia in 2008.
"We always knew the Somalis inside Somalia knew that al-Shabab was bad," Bihi said. "We were concerned about the Somalis in the diaspora ... who never really knew the facts on the ground and were always manipulated and misled."
"So that's why it's a victory. They now know exactly what al-Shabab is, as much as the Somalis inside."
Terrorism expert Clint Watts wrote on his blog, Selectedwisdom.com, that Hammami's plight "probably soured recruitment pipelines from the West into Somalia."
Along with Adam Gadahn in Pakistan a former Osama bin Laden spokesman the 29-year-old Hammami was one of the two most notorious Americans in jihadi groups. He grew up in Daphne, a community of 20,000 outside Mobile, the son of a Christian mother and a Syrian-born Muslim father.
His YouTube videos that featured him rapping and his presence on Twitter made him one of the most recognizable and studied U.S. foreign fighters. The FBI put Hammami on its Most Wanted Terrorist list in 2012 and offered a $5 million reward in March for information leading to his capture.
U.S. prosecutors had charged Hammami with providing material support to terrorists.
In Alabama, Husam Omar, vice president of the Islamic Society in Mobile, a mosque Hammami once attended, said he had not heard of the reports of his death.
"I'm shocked," Omar said, declining further comment.
A man who answered the door at Hammami's parent's home declined to identify himself and said, "I am sorry I cannot talk about it right now." The home is an upper-middle class neighborhood where most of the houses fly American or Alabama University flags.
A member of al-Shabab who gave his name as Sheik Abu Mohammed told The Associated Press that Hammami was killed in an ambush in Somalia's southern Bay region. Some of Mohammed's associates carried out the killing, he said. Two other fighters with Hammami, including a Briton of Somali descent, were also killed, he said.
Hammami, an Arabic speaker, moved from Alabama to Somalia and joined al-Shabab in about 2006. He fought alongside al-Shabab until they had a falling out amid increasing tension between Somali and foreign fighters. He first expressed fear for his life in a March 2012 web video that publicized his rift with al-Shabab.
The first serious attempt on his life came in April, when al-Shabab's leader, Mukhtar Abu Zubeyr, also known as Godane, ordered the killings of several of Hammami's associates.
"Just been shot in neck by shabab assassin. not critical yet," Hammami tweeted after the April attack.
Hammami accused al-Shabab's leaders of living extravagant lifestyles with the taxes fighters collect from Somali residents. Another grievance was that the militant leaders sideline foreign militants.
Hammami has been "a thorn in the side of al-Shabab" for more than two years and "one of the few surviving dissenters after Godane's bloody purge over the summer," said Berger, who runs the website Intelwire.com.
"Hammami brought a lot of unwelcome outside scrutiny on Shabab from the international jihadist community. His story will likely be a case study on what can go wrong when Westerners join jihadist movements," Berger said.
Before the falling out, Hammami made frequent appearances in combat videos, and in 2011 he released two rap songs, "Send Me a Cruise (missile)" and "Make Jihad With Me."
Last week, Voice of America interviewed the wanted American, who said he was unlikely to ever return to the U.S. "That is not an option unless it's in a body bag," Hammami said.
Frequent Twitter postings over the last year alluded to the fact that Hammami's life was in danger.
"i'll be a mujahid till the day i die whether it's shabab who kills me or someone else," Hammami wrote in an April Twitter posting.
___
Straziuso reported from Nairobi, Kenya. Associated Press reporters Amy Forliti in Minneapolis, Melissa Nelson in Daphne, Alabama, and Jay Reeves in Birmingham, Alabama, contributed to this report.