Photos of the Islamic State fighter show a fearsome-faced man, clad all in black with a full beard and an assault weapon.

He died this year on an Iraqi battlefield, blown to pieces by a bomb, fellow fighters say.

But like any number of Islamist militants, this jihadist was once a very different person.

Ahmed al-Darawi had been a young political hopeful in Egypt. A 38-year-old father of two, he had loved fashion and soccer. In his 20s, he had been a police officer and then a sports marketer for a telecommunications firm. But in the years since Egypt’s 2011 uprising, in which he was an idealistic participant, he morphed from a prominent rights activist into a die-hard fighter for the Islamic State.

The news last month of his death shocked friends and colleagues. But his transformation — from aspiring parliamentarian to battle-hardened jihadist — has underscored the myriad ills driving thousands in the region to take up arms in the name of one of the world’s most feared militant organizations. The Islamic State now holds wide swaths of territory in Syria and Iraq.

An undated photo of Ahmed al-Darawi. (Courtesy of Haythem al-Darawi)

“How sweet life is between the Quran and my Kalashnikov,” reads a Feb. 24 post from a Twitter account that researchers who study jihadist groups online believe belonged to Darawi.

In many ways, his story reflects the devastating path the Arab world has taken in recent years: from the promise of democratic rebellion to the horrors of sectarian conflict.

The inability of Arab governments to “address social ills and give their citizens a sense of national identity” in the wake of the Arab uprisings has turned many like Darawi to the embrace of the Islamic State, said Kamal Habib, co-founder of the Egyptian militant group Islamic Jihad.

Habib has since renounced violence and works as an Islamic scholar. He said the Islamic State, which has implemented a strict interpretation of sharia law, offers the disenfranchised the hope of a just society based on Islamic rather than civic principles.

“They think the Islamic State will give them the respect they don’t get as nationals of their own countries,” he said. “It gives them structure and a place where they can search for meaning. It’s an alternative to the failed states we see now.”

Although Darawi appears to have adopted the jihadists’ goal of a pan-Islamic state before he died, he had been a central figure in the web of activists that emerged from the revolt in Cairo’s Tahrir Square.

As a former police officer, Darawi served as a key liaison between pro-democracy demonstrators and the Interior Ministry officials whom they wanted to implement police reform. Darawi had resigned from the police force in 2007 to protest the deep-rooted corruption he said permeated the security apparatus.

“I want to tell you that you’re part of the people. Don’t be an enemy of the revolution,” he said to Egyptian policemen in 2012 during a television appearance on a private satellite channel.

Clean­shaven in a white shirt and olive-colored jacket, Darawi passionately called on police to “restore security.”

“And work as God has told us,” he said.

In those heady days of optimism and political freedom, Darawi decided to run for parliament. But the seat he contested was granted to a longtime supporter of the regime Darawi had sought to oust, amid widespread accusations of fraud.

A court ruling to dissolve Egypt’s first freely elected legislature later that year angered Darawi, his brother said. The last time Darawi was politically active, colleagues said, was when he campaigned for a moderate Islamist politician, Abdel Moneim Aboul Fotouh, in the presidential election in 2012.

“He was a big believer in the idea that ‘Islam is the solution,’ but not through taking up arms,” said Sherif Hassan, a sports journalist who knew Darawi when he worked at the multinational telecommunications firm Etisalat.

But political infighting and polarization had begun to tear at the unity that marked Egypt’s rebellion against a repressive regime, and the ideological rifts between Islamists and their liberal and leftist counterparts deepened.

It was then that Darawi, while critical of the Muslim Brotherhood group that swept to power, began to express increasingly Islamist positions on political and social issues, activists say.

“You could tell his ideas were not very pluralist when it came to society,” said one Egyptian activist who knew Darawi and spoke on the condition of anonymity because of the government’s crackdown on Islamists.

“He had some very problematic stances on sharia-based ideas of legislation,” the activist said.

Darawi withdrew from the political scene, telling colleagues he planned to travel to the United States for medical treatment.

By then, the rebellion in Syria had shifted to a bloody armed conflict that eventually would collapse into an even deadlier civil war. And the Islamist groups that flourished here in the post-uprising period already were facilitating the travel of Egyptian fighters to the battlefield.

Turkey, which shares a 500-mile border with Syria and whose government is sympathetic to the rebels, acted as the primary conduit for militants seeking to join the revolt against Syrian President Bashar al-Assad. Researchers say that hundreds of Egyptian militants, if not more, are fighting in Syria and Iraq.

But why Darawi finally decided to leave Egypt for the life of a militant remains a mystery, family members and friends said. Darawi’s younger brother, Haythem, said Darawi told the family that he was traveling to Turkey, also for health reasons, in 2013.

It became increasingly difficult to reach Darawi after that, Haythem said, and his brother kept changing his Turkish cellphone number.

Hassan, the journalist, saw Darawi on a flight from Cairo to Istanbul in June 2013. He said they chatted about the growing opposition to Egyptian President Mohamed Morsi, a former Muslim Brotherhood leader who would be toppled by the army just a few weeks later.

“He seemed indifferent” to the political situation in Egypt, Hassan said. “He didn’t seem to care.”

A few months after that, online posts show, Darawi would surface as the commander of a rebel brigade in Syria’s Latakia province. He assumed a nom de guerre: Abu Muadh al-Masri. His brigade, the Lions of the Caliphate, eventually would pledge allegiance to the Islamic State.

“With God’s blessing, we will plant the tree of ISIS and it will bear fruit,” reads a March 6 post from Darawi’s alleged Twitter account. ISIS is a commonly used name for the Islamic State, which declared a caliphate in June in the territories under its control.

Another post on Feb. 14 expressed frustration about the lingering nationalism hindering the establishment of a cross-border Islamic state.

“How can it be a caliphate,” the post reads, “everyone refuses to be to ruled by anyone but someone from their own country.”

“How will we liberate al-Aqsa [the Muslim holy site in Jerusalem] if they say we will apply sharia but not infringe on other’s borders,” it continues, in a swipe at the Islamist movements that confine their politics to the domestic arena.

The anonymous author of an account of Darawi’s time in Syria and Iraq that was posted to the same Islamist site that announced his death last month said Darawi struggled to finance his brigade after the military coup in Egypt against Morsi.

The Egyptian government’s crackdown on Islamists disrupted the flow of cash to Syria, said the author, who described himself as a fellow jihadist. It was five months after Morsi’s overthrow, in November 2013, that Darawi and his fighters defected to the Islamic State.

Haythem said his family received an anonymous phone call notifying them of Darawi’s death in May. Researchers say it is not uncommon for the Islamic State to officially announce a fighter’s death weeks or even months after it happens.

He “left his wife & children behind seeking Allah’s pleasure with a martyrdom op,” one pro-

Islamic State Twitter user — whose account has since been suspended — posted of Darawi on Oct. 23.

At what point Darawi shifted to Iraq, where jihadists say he blew himself up, is unclear. Haythem said he is now taking care of Darawi’s wife and children.

Heba Habib and Amer Shakhatreh contributed to this report.