MOGADISHU, SOMALIA — An American who became one of Somalia’s most visible Islamic rebels and was on the FBI’s Most Wanted Terrorist list with a $5 million bounty on his head was killed Thursday by rivals in the al-Qaida-linked extremist group al-Shabab, militants said.

The killing of Omar Hammami, an Alabama native known for his rap-filled propaganda videos, may discourage other would-be jihadis from the U.S. and elsewhere from traveling to Somalia, terrorism experts said.

Hammami, whose nom de guerre was Abu Mansoor Al-Amriki, or “the American,” was killed in an ambush in southern Somalia following months on the run after falling out with al-Shabab’s top leader, the militants said.

Reports of Hammami’s death have cropped up every few months in Somalia, only for him to resurface. But J.M. Berger, a U.S. terrorism expert who closely follows the inner workings of al-Shabab, said he thinks the current reports are accurate.

The rebels did not immediately present proof of Hammami’s death.

Hammami was highly critical of al-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 long been an attractive destination for foreign fighters, and al-Shabab counts several hundred foreign fighters among its ranks, including about two dozen Somali-Americans from Minneapolis recruited over 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, Alabama, 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 in an upper-middle class neighborhood with manicured lawns where most 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.

Al-Shabab and al-Qaida announced formal merger in February 2012, but the Somali militant group maintained a reputation of being hostile to foreign fighters.

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.”

In December, al-Shabab slapped Hammami publicly in an Internet statement, saying his video releases were the result of a “narcissistic pursuit of fame.”

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.