MOGADISHU, Somalia — Men are forced to grow beards. Women can't leave home without a male relative. Music, movies and watching sports on TV are banned. Limbs are chopped off as punishment, and executions by stoning have become a public spectacle.
Somalia is looking more and more like Afghanistan under the Taliban — two rugged countries 2,000 miles apart, each lacking a central government, each with a hard-line Islamist militia that cows the public into submission.
Al-Shabab in Somalia and the Taliban in Afghanistan — their tactics increasingly mirror each other. Those tactics worked for the Taliban until the U.S. invasion overthrew it in 2001, and now they are making a comeback. Meanwhile, al-Shabab has gained control over large swaths of this arid Horn of Africa country.
In the latest adoption of tactics long used by the Afghan militants, al-Shabab is ordering households in southern Somalia to contribute a boy to the militants' ranks. Childless families have to pay al-Shabab $50 a month. That's Somalia's per capita income.
An al-Shabab commander attributed the shared tactics and ideology to the fact that both groups follow a strict form of Islam.
"One more thing we deeply share is the hatred of infidels," the commander, Abu Dayib, told The Associated Press.
Some experts say the similarities are no accident.
"Al-Shabab is copying exactly whatever the Taliban was doing in the late 1990s, because they think the strategies the Taliban employed in Afghanistan were successful," said Vahid Mujdeh, the Afghan author of a book on the Taliban. "There is no doubt that the Taliban are like heroes for al-Shabab."
U.S. and other security officials worry about another common thread: Both the Taliban and al-Shabab have links to al-Qaida.
Until their overthrow, the Taliban gave Osama bin Laden and his group safe haven in Afghanistan. Many analysts believe al-Shabab is now controlled by al-Qaida-linked foreign fighters who honed their skills in Iraq and Afghanistan.
Last month Al-Shabab claimed its first international attack— twin bombings in Uganda that killed 76 people watching the World Cup final on TV. Uganda said at least one of the confessed participants belonged to al-Qaida. Simultaneous attacks are an al-Qaida hallmark.
Both the Taliban and Al-Shabab moved into a power vacuum left by inconclusive civil war, and were initially welcomed by publics desperate for some form of law and order. What they got was an extremely harsh penal code.
Now the Taliban is gaining ground despite NATO forces' efforts to push them back, and brazenly advertised its clout this month by stoning a young couple stoned to death in front of a crowd, allegedly for committing adultery.
In Somalia, two months ago, Al-Shabab accused Ahmed Ali Shuke, a 27-year-old laborer, of being a government spy and slashed his tongue.
"Both groups derive support from followers of their strict interpretations of Shariah (Muslim law). Both groups also derive support by terrorizing the population," said Letta Tayler, a counterterrorism specialist at Human Rights Watch. "The people of Somalia, as in Afghanistan, have learned the hard way that if they speak out against these groups' practices, they will get killed."
Both the Taliban and al-Shabab win some sympathy by positioning themselves as defenders against invading infidels. Foreign forces — African Union troops in Somalia, U.S. and NATO forces in Afghanistan — feed into that narrative when they kill civilians during raids, Tayler said.
"Even many Somalis who don't like the Shabab's ideology are immensely thankful for the drop in crime in many areas under the group's control. Their daughters are not raped. Their crops are not stolen en route to market," she said.
But Human Rights Watch said in an April report that the stability was achieved by "unrelenting repression and brutality."
Several women told Human Rights Watch that they had been flogged or jailed for selling tea to support their families because the work brought them into contact with men.
Somalia has had no functioning government since 1991, and militants with guns have been filling the void ever since. Al-Shabab, which the U.S. branded a terror group in 2008, is believed to have several thousand members.