And just as Islamic State seized the central bank in Mosul in northern Iraq, AQAP looted Mukalla’s central bank branch, netting an estimated $100 million, according to two senior Yemeni security officials.

“That represents their biggest financial gain to date,” one of the officials said. “That’s enough to fund them at the level they had been operating for at least another 10 years.”

In a sign that AQAP not only wants to get rich but also seeks official recognition as a quasi-state, it unsuccessfully sought permission from the Yemeni government to export crude oil in October and collect a share of the profits, according to a tribal leader and two senior officials.

Yemen’s government refused, fearing the deal would give de facto recognition to the internationally blacklisted group.

“Al Qaeda sent a mediator to the government to get them agree to listen to this deal,” the tribal leader, who is in southern Yemen, told Reuters.

“Their offer was they need the official documents from the government to sell crude oil, and they would get 25 percent of the profit, and 75 percent for the government.”

The government rejected the offer, said both the tribal leader and Badr Basalmah, a former transport minister in Yemen’s government.

"I prefer that al Qaeda stay here. The situation is stable, more than any 'free' part of Yemen.." Mukalla resident

“Yes, that happened,” Basalmah said, speaking by telephone from the Saudi capital of Riyadh. “The government refused completely to have anything to do with this deal because it would give authority and legitimacy to al Qaeda.”

ON THE WATERFRONT

In Mukalla port, a thriving fuel smuggling network enriches AQAP daily.

Tribal sources, residents and diplomats told Reuters the militants gained control of the ports in Mukalla and Ash Shihr when they first stormed the cities in April last year. The militants began imposing tax and custom tariffs on shippers and traders.

“The group is experiencing a period of obscene, unprecedented wealth and luxury,” one resident of Mukalla told Reuters.

A current official in the transport ministry estimate AQAP’s daily revenue at $2 million a day. Some local traders put it as high as $5 million a day from customs duties and smuggled fuel, according to Basalmah, Yemen’s former transport minister.

“You will find hundreds of oil trucks there smuggling fuel from one area to another where they are selling it,” said Basalmah.

Abdallah al-Nasi, governor of neighbouring Shabwa province, where AQAP controls some territory, said the group has become the de facto fuel supplier. “They sell the fuel to whoever buys it,” Nasi told Reuters by phone “The government-run petrol stations buy from them and sell it on to the citizens.”

Tribes who work with al Qaeda now control much of the country’s oil infrastructure. Six white oil tanks on a beach between Mukalla and Ash Shihr are linked by pipeline to the Masila oilfields which are estimated to hold more than 80 percent of Yemen’s total reserves.

After army forces withdrew from the area last year, armed local tribes linked to al Qaeda took charge. That prompted major companies operating there – state-owned PetroMasila, Canada’s Nexen Energy and France’s Total – to shut production and end exports. A PetroMasila official said that small amounts of oil are still being extracted for use in provincial power generators. Total said it has not restarted operations. Nexen did not respond to a request for comment.

ROBIN HOOD

It is a dramatic change of fortune for a group that was founded in the late 1990s and merged with al Qaeda’s Saudi branch in 2009. After a campaign of suicide bombings and attacks against the Yemeni government, and two foiled bomb plots on U.S.-bound airliners, AQAP was forced into retreat by assaults from Yemeni tribes and troops as well as persistent U.S. drone strikes.

Now the group has embarked on a brazen campaign to shake down state-owned firms, including the national oil and mobile phone companies. AQAP uses the money it extorts to win favour among its subjects. Elisabeth Kendall, a Yemen scholar at Oxford University, calls it a “Robin Hood” strategy.

In January, a copy of a demand issued by AQAP circulated on local media. The notice, on AQAP letterhead, demanded $4.7 million from the national oil company’s bank account in Mukalla.

“May God grant that all serve the country and the faithful,” the note said.

"The poor have been paying alms to the rich and the rich don't pay, and it's the tyrants and oppressors who are the ones getting this money." Ali bin Talib al-Kathiri, AQAP fighter

A top government security official said the oil company paid the full $4.7 million. A source at the bank said it had paid only $1.4 million. A representative of the oil company declined to comment.

Officials at the three biggest national mobile phone companies, MTN, Sabafone and Y Telecom, said AQAP had also demanded payments of $4.7 million each from them. The firms all said they refused to pay.

Late last year, AQAP cancelled payroll taxes in areas it controls because it deemed the practice un-Islamic. In a video posted on YouTube in November, the chief of al Qaeda’s Sharia court in Hadramout – the coastal region where Mukalla is capital – announced it would repay government workers taxes they had paid. In the video, a bureaucrat is shown counting out wages for a worker from a bulging wad of Yemeni currency.

“The poor have been paying alms to the rich and the rich don’t pay, and it’s the tyrants and oppressors who are the ones getting this money,” AQAP fighter Ali bin Talib al-Kathiri said in another video. “Because those oppressors have not implemented God’s law, they’ve eaten up the people’s money in sin.”

Kathiri died in January in a gun battle with southern tribesmen. But AQAP’s populist strategy is paying off, said Oxford University’s Kendall.

The group regularly posts pictures of its fighters repairing damaged bridges and paving streets in Hadramout and other cities under its control. It says the money for the repairs comes from groups such as Guardians of Sharia or Sons of Hadramout, names AQAP has taken on as part of a rebranding effort to emphasise its local origins.

In one video posted on Feb. 28, AQAP members deliver free medical supplies and equipment to the kidney dialysis and cancer wings of a local hospital. The boxes of supplies are sealed with the tape of a Western pharmaceutical company.

“These are some medicines from your brothers, the Guardians of Sharia, to al-Jamii hospital which was going to be closed ... because of no money,” says one fighter whose face is blurred out. The video also shows a hospital official saying he had received money from al Qaeda to pay workers’ salaries.

Video: How war boosted AQAP

A POPULAR HAVEN?

The group has exploited sectarian grievances to brand their state-building project as a liberation movement. “So many areas fell to us after the Houthis left because we are the entity that people trust,” AQAP leader Batarfi said.

In the five coastal provinces stretching from the government’s temporary seat in Aden to Mukalla, a familiar pattern has recurred in recent months. Al Qaeda forces storm a town, plant their flags, and then watch as local leaders acquiesce.

Citizens say they are tired of moving and would rather live with al Qaeda’s control.

“With al Qaeda, if you resist, you never know when they could come and assassinate you,” one Yemeni sheikh said.

AQAP has also learned to be less cruel than its rival, Islamic State, which has struggled to gain a foothold in a population repelled by its brutality. While AQAP has resorted to killing suspected “sorcerers,” and carried out stonings of at least one man and woman accused of adultery, residents and the group’s online media suggest such incidents are rare.

And even when AQAP publicises punishments, their videos and photographs never show the level of gratuitous gore that Islamic State revels in. Rather than resorting to mass beheadings, AQAP has detained or put under house arrest several dozen army officers and other figures they see as a threat, activists said.

One Mukalla resident said her life had changed little since AQAP swept through the city. “We carry out our lives normally, they walk among the people,” she told Reuters by phone. “Of course they’re trying to create a popular haven.”

A regional diplomat who follows Yemen says that if al Qaeda manages to successfully root itself as a political and economic organisation, it could become a more resilient threat, much like al Shabaab in nearby Somalia.

“We may be facing a more complicated al Qaeda,” the diplomat said, “not just a terrorist organisation but a movement controlling territory with happy people inside it.”

Additional reporting by Sami Aboudi in Dubai, Tom Miles in Geneva, Jonathan Landay in Washington, Jonathan Saul in London, Ali Abdelaty in Cairo.

————— By Yara Bayoumy, Noah Browning and Mohammed Ghobari Photo editor: Simon Newman Graphics: Christian Inton Design: Catherine Tai Video: Duarte Garrido Edited by Simon Robinson and David Rohde