CAIRO — With a sense of relief, Mohannad Ghallab, the Egyptian spokesperson for Yemen's al-Qaeda branch, texted me, "I'm on the corniche."

I was a thousand miles away at the time and had been corresponding with him on and off for six months. It was April 21, 2015, and he had just arrived in Yemen's seashore city of Mukalla — the provincial capital of Yemen's largest province of Hadramawt — which al-Qaeda had just gained control of in its search for a new safe haven.

It is also one of very few Yemeni cities spared from destructive violence that has torn the country apart, either at the hands of Houthi rebels, who seized the capital last year, or a Saudi-led campaign aimed at driving them out.

The city and its sea were a window to fresh air and life in the open after spending the past few years hiding and fighting. Ghallab and al-Qaeda militants had fought the U.S.-backed Yemen military offensive that drove the group out of large swathes of land it had gained control over in the wake of the 2011 uprising.

Throughout the eight-hour drive from his undisclosed hideout to Mukalla, Ghallab kept a close eye on the skyline, mindful of drone strikes that frequently target suspected al-Qaeda motorcades. Arriving safely in Mukalla meant surviving possible death, as drones normally refrain from firing missiles inside cities. But this would change later that night.

As he was settling down for dinner on the corniche, Ghallab tersely described his deep sense of relief, texting: "Al-Donia peace," or "the world is at peace."

Less than two hours later, a strong explosion rocked the city. A U.S. drone fired three missiles, killing him and five others on the spot, including al-Qaeda's top military commander Nasser al-Ansi.

The making of a jihadi

A bold writer, a fluent English speaker, a battle-hardened fighter and an ultraconservative Salafi who staunchly opposed both the Muslim Brotherhood's Machiavellian approach to power and the savagery of ISIS, Ghallab put all his talents and capabilities into the service of al-Qaeda, years after Egypt failed him.

A firm believer in jihad, his detention in Egypt's notorious State Security cells and subsequent three-year imprisonment helped define his frame of reference and easily pushed him into the arms of al-Qaeda.

Though he always insisted on identifying himself as an al-Qaeda "soldier," his loss had a special impact on the group. For nearly a year before his death, he coordinated a new media strategy to infuse the narrative of Yemen's al-Qaeda — the group's most dangerous offshoot — into Western media coverage, and break the U.S. government's monopoly over the story. This strategy was also meant to counterbalance and compete with al-Qaeda's top rival group in the region, ISIS.

Trying to break new ground

In one incident, the FBI director publicly criticized The New York Times for quoting Ghallab as an "anonymous source," thus giving him protection. In a lengthy Wall Street Journal article, he was widely quoted about the transformation of al-Qaeda's media strategy.

The 35-year-old was constantly multitasking and improvising. Among the photos he shared with me, one showed him wearing a grey robe inside a tent in a mountainous area giving media training sessions to fellow al-Qaeda militants. A second showed him holding a camera and filming a reception party celebrating newly escaped al-Qaeda militants. His most recent pictures showed him with a blue sling, having smashed his elbow.

As a main contributor to al-Qaeda's online magazine Inspire, the group's top propaganda outlet seen as instigating waves of lone wolf attacks in the West, Ghallab appeared once on the cover page in a black Balaklava, posing in front of cameras like a fashion model.

He provided tips and advice to top commanders about the best ways to win hearts and minds, and he attended leadership meetings, offering his insights and views on the group's strategy and movements.

The Egypt years

Born on July 15, 1979, in the populous district of Shubra, Ghallab initially carried a different name and had a starkly different life. There, he was Amr Abdel Hamid Abdel Wahab Permawy (he insisted on writing his last name with a P not a B). Like many middle-class families, his parents — one a pious engineer and the other a school teacher — spent the first five years of Permawy's life in Saudi Arabia to save money and secure their children's future.

In an amusing and exceptionally early encounter with the police, a 5-year-old Permawy prompted a frantic call to the authorities when he went missing. "They found me later snoring under a desk," he recalled.

At 12, he experienced loss, grief and death. Nearly six years after returning from Saudi Arabia, Permawy lost his mother in a sudden asthma attack. He was left with three sisters, the youngest of whom was six months old, and a heartbroken father.

"It was very hard," he recalled. "I didn't understand her death. I didn't get it."

In 2000, Permawy graduated from Helwan University's College of Arts with a journalism degree. Moving between Cairo's newsrooms, he took an internship at the state-owned Al-Ahram daily, producing business coverage.

Short stints at the privately owned tabloid Al-Nabaa and the business daily Al-Alam Al-Youm preceded his final job with the state-owned Middle East News Agency (MENA).

But somewhere along the way, Permawy's path radically deviated and he went from a moderate Muslim in love with rock music and Western pop culture to an ultraconservative Salafi with a beard and shaved mustache.

Whenever he was asked, Permawy attributed this shift to the Sept. 11 terror attacks.

"It was like a wakeup call for me," he said, adding that he went into seclusion at his father's house in a rural area near Cairo, where he devoted all his time to reading the Koran and watching videos of jihadis in Chechnya.

Ghallab provided no other reason, except great admiration for al-Qaeda leader Osama bin Laden, and for his cause.

Whether the loss of one of his closest friends in a car crash — an incident he mentioned mid-conversation — had anything to do with his decision is unclear. I didn't get the chance to ask him.

Less than three years after becoming an ultraconservative, and only three months after his marriage, he was arrested by state security forces. "I sat handcuffed and blindfolded for days. I didn't see light. My friends were tortured," he said.

They were accused of attempting to travel to Iraq with the intention of joining jihadi groups fighting American forces.

After the 2011 uprising that ousted longtime autocratic President Hosni Mubarak and his U.S.-backed regime, Permawy recalled retrieving his file from the state security headquarters stormed by protesters.

"It was a thick 500-page file, with everything from who I phoned, to when and what I said. They even reported the phone calls that went unanswered.

Of his imprisonment in Egypt, he said, "If you enter prison half jihadi, you leave 1000% jihadi. If you enter 100% jihadi, you leave a martyr seeker."

After his release, he lost his job at MENA. "They were even afraid of a handshake," he said.

Asked if he would ever return to Egypt, he said, "Can you find me a way to come back and live in peace without having men storming my house, terrifying my kids and stripping me naked?"

He followed Egypt's political upheavals closely from abroad — from an Islamist-led government to the military comeback — through his favorite Joe Tube satire and Al Jazeera news coverage. The constant killing and imprisoning of Islamists by security forces provided him with another reason to stay away.

"In Egypt, Islamists are either dead or in prison," he said. "I think I made the right move at just the right time."

The corniche in Mukalla, Yemen, where Mohannad Ghallab was killed — Photo: Mada Masr

From Cairo to Yemen

For some Salafis and radical Islamists like Permawy, the 2011 revolution was a time to push strongly for the implementation of Islamic Sharia. But the public was split between those who were terrified of an Islamist takeover and were prepared to prevent it at any cost, and those who saw them as the only viable oppositional force.

"I could easily see that the military was making a comeback," he said. "It was very obvious from the very beginning."

By September 2011, he had arranged his second escape. He shaved his beard, put on casual clothes and dark sunglasses and headed to the airport whispering prayers.

"Today I begin to achieve my dream, break myself and force myself toward what is good," he wrote in a series of articles remembering his anxiety before departure. "Now I will defeat the tyrants who thought I was dismayed after detention and torture. The love for jihad has possessed my heart."

A nervous Ghallab arrived at Sanaa airport, where he was due to fly to his ultimate destination. But he took a different corridor instead, leading him to airport officers who prevented him from leaving the airport and insisted on deporting him over unspecified suspicions. He told the officers he was there for tourism. They weren't convinced, and threatened to send him back to Cairo.

"I went to pray," Ghallab recalled. "I put my forehead on the ground bowing and I asked for God's help."

After a bribe to the officer, his long day finally ended with safe passage.

Permawy documented his impressions of jihadis in a romantic and utopian way. During his time with al-Qaeda, he wrote extensively about lone wolf jihad and U.S. strategy, and contributed to the group's magazine.

His resentment for the rival ISIS sparked an online war with its supporters. In one incident, he tried to shed light on the leaders of ISIS in Yemen, which brought him under heavy criticism from their supporters, who later expressed relief at his death.

Cheating death

Ghallab had rehearsed his death several times in the last few years, either by drone strike, or in a fierce gun battle. The daily threat of drone strikes prompted him to write a series of articles about the best ways to avoid them, which he posted on his Twitter account.

The drone strikes were relentless, leaving a trail of dead bodies behind for Ghallab to deal with. He collected the dismembered and charred bodies of his friends after a number of strikes.

In one incident, on April 19, 2014, Ghallab narrowly escaped death when a sprawling training camp in the mountainous region of Mahfad wasn't ready to receive him and his fellow militants. Spending the night two kilometers away, they were spared.

"It was a chilly night and we didn't have enough covers," he recalled. "Some slept under the bushes, others inside a car and some wrapped themselves with car covers." Shortly before midnight, balls of fire rained from the sky over the camp. Dozens were burned alive, including youngsters, while others had their heads smashed by rocks.

"We counted the bodies of the brothers killed that night. It was 45," he said. With other attacks the same day, the total number reached 60.

Ghallab kept a record of how many strikes killed how many al-Qaeda members, and in which cities. He distributed pictures of friends and their vehicles turned into charred twisted metal mingled with body parts after being hit by U.S. drones.

Al-Qaeda opened the prison in Mukalla to release their men, and seized billions of Yemeni riyals from the Central Bank and military barracks. Just days later, in April 2015, the city turned into a death trap for al-Qaeda and Ghallab.

Six months after his death, in a visit to Mukalla, I stood at the same place along the corniche of the Arabian Sea where he was struck down. Demolished and blackened steps were reminders of the drone strike that killed him. It was also the same place al-Qaeda executed two Saudi nationals on charges that they planted electronic chips that helped guide drones to targeted al-Qaeda militants — a tactic the group is now wise to.

One of those killed was Ghallab's close friend Hammam al-Hamid or Mousaid al-Khouiter. His family told a Saudi newspaper that he wanted to leave the group, leading al-Qaeda directly to him.

Ghallab's death was reported by local news sites, and pictures and eulogies have since been posted under the hashtag #MuhannadGhallab, in Arabic and English.

"I am waiting for death at any moment," he often said.

Soon after he died, a close associate of his revealed that he was a "martyrdom seeker" but that his request for a "martyr attack" had been denied.

The author of this piece wishes to remain anonymous.