Updated, 8:45 a.m., April 30

Omar Hammami's enemies appear to be closing in on him. The most wanted American jihadi in Somalia survived a Thursday assassination attempt only to tweet today that his former allies in al-Qaida's Somali affiliate are stepping up their efforts to wipe him out. On Monday, according to what Hammami warned might be his last words, Shebab gunmen surrounded his home, marched him to "court" and opened fire in a Somali forest.

"Even if we die weve won," Hammami tweeted from his @abumamerican Twitter account today. "May not find another chance to tweet but just remember what we said and what we stood for."

Hammami is a 28-year-old Alabaman who has been waging jihad in Somalia since 2006, sometimes through rap music. (He later claimed he didn't actually perform the jihadi rhymes that went out under his nom de guerre.) But last year he had a dramatic and very public break with his former colleagues in al-Shebab, and since then he's relentlessly trolled the Somali wing of al-Qaida, all while proclaiming he'll be a jihadi until the day he dies. "I figure i can't do much but wait 4 my time," he told me via direct message last month.

That time may be up. On Thursday, Hammami was sipping tea at an undisclosed location in Somalia when he heard three gunshots from behind him. A man he claims was a Shebab assassin shot him with a pistol through the neck. Incredibly – and true to form – Hammami tweeted his own attempted murder, even posting pictures of his bullet wound. He joked that his albums might sell better, post-mortem.

I spoke to Hammami that day. He explained that he was in tremendous pain, but the bullet passed through his neck without tearing through his windpipe or any major artery. Hours after the shooting, Hammami said he hadn't been stitched up, and was treating his bullet wound with gauze and iodine. "Remembered allah and stayed calm. stable now," he told me.

Supposedly, the would-be assassin was conspicuous, maybe a foreigner, "a known shabab guy w/this type a job." Hammami thought the tribe that is protecting him would keep him safe, which I understood to mean they were going to retaliate. Publicly, he said Shebab's leader, Moktar Ali Zubayr, had "gone mad" and was sending forces after Hammami, threatening to ignite a civil war.

That was the last I heard from Hammami in private.

Today Hammami reemerged on Twitter to update his 2,391 followers about what happened. On Friday, Shebab fighters surrounded a house he was staying at. "They said drop guns &go to court or prepare 4 war," he tweeted. Not trusting Shebab, he and an entourage of unknown size went to "an open place," guns in hand.

Seemingly accepting the explanations Hammami provided to the court, the Shebab cohort, bolstered by an "army," agreed to drop the charges – but put Hammami on notice that they would still be gunning for him. In Hammami's telling, Shebab's army was reluctant to fight at that moment, and so Hammami was free to go. Until he and his allies noticed Shebab men following them through a forest.

"We were forced to fight in self defense &killed 3 and wounded others w/no losses. The main amir who wanted 2 fight us was from the killed," he said. "They now have to bring outside forces who dont know why they are fighting to track us in the forest." Shebab raided the houses of Hammami's allies and emerged with condoms, alcohol and documents – ostensibly planted evidence. "Their goal is to kill us regardless of reason," he tweeted.

"It's [the] culmination of full faceted dime [sic] warfare against those who speak truth," Hammami continued. Boycott, tribe politics, assassination, char[acter] assass[ination], mil[itary] attack."

Hammami tweeted that he was outnumbered and sounded frightened. Hyperbole is part of the way he communicates, but this seemed different. He did not return Twitter DMs trying to find out if he was in immediate danger. Minutes after I sent him one, he tweeted publicly, "May not find another chance to tweet but just remember what we said and what we stood for. God kept me alive to deliver the mssg 2 the umah."

For about six months, Hammami has engaged in a public colloquy with American counterterrorism professionals, on subjects both highbrow (the meaning of jihad), lowbrow (barbecue tastes) and personal (the wisdom of Hammami remaining in Somalia while Shebab hunts him). Those counterterrorism analysts have grown to like him, in spite of themselves, and feared that Hammami would not listen to their entreaties to turn himself in to U.S. authorities so he can live. Their worst fears might be about to come true.

Update, 8:45 a.m., April 30: Hammami is alive. He just tweeted: "Abu mansuur, afghani, hasan thahir uweys, &others passed a fatwa on http://aljahd.com that fighting us is haram &that we arent bughat" – which is to say, that Hammami isn't a religious rebel. Uweys is a big shot in Somali extremist Islamist circles and is aligned with a faction of Shebab with what I understand are strained ties to the faction that's hunting Hammami. (I could be misunderstanding; I'm no Somalia expert.) "Abu Mansuur," while also confusingly being part of Hammami's nom de guerre, probably refers to this guy, another Shebab leader.

Yet he seems not to be out of danger. "They have started harrassing our wives," Hammami continued. "Army from gedo refused 2 come. Theysaid they will kill me even if they lose 100 despite defections."