After five months fighting in Syria with the rebels, Ali Almanasfi's luck finally ran out. On Wednesday the 22-year-old Briton took a wrong turn and drove into a government checkpoint near the city of Idlib. Syrian soldiers immediately opened fire. They killed Almanasfi together with his two fellow passengers: an American woman and Islamic convert, Nicole Mansfield from Michigan, and a third, so far unidentified man, possibly Canadian.

Syrian TV showed the bloody aftermath of this one-sided encounter: a black VW Golf riddled with bullets and a haul of Kalashnikovs. Also visible was Almanasfi's maroon British passport. It gave his place of birth – London – and date of birth, June 1990.

For the Syrian authorities this was happy proof that Syria's two-year war was no longer a domestic conflict but was attracting European and North American volunteers, much as the Spanish civil war did in the 1930s.

The Briton's violent death was the culmination of an improbable journey from the streets of Acton to Aleppo, driven, according to friends, by a redemptive desire to atone for past misdeeds.

Almanasfi's family were conservative Sunnis from Damascus, Syria's capital. But he grew up in west London, the son of a bus driver, who later split stormily with Almanasfi's mother and remarried twice. In his passport photo Almanasfi looks not unlike Noel Gallagher.

As a teenager, according to his friend Tam Hussein, Almanasfi drifted into trouble. He got involved in street fights with other Acton gangs and petty crime: drugs, stealing, booze. In 2008 his father sent him to Syria to cool down. Apparently this didn't work. A year later he did something he would bitterly regret: drunk, he attacked an older man. The details are hazy. But he was caught, sentenced to four or five years in jail, and initially imprisoned in Feltham young offenders institute.

It was in prison that he became interested in religion. He discovered an identity. He grew a beard. Hussein recalled: "He became increasingly religious; the ghetto talk, the accent, the slang slowly disappeared.

"He became more articulate. He quoted Qur'anic verses asking me if there were any novels or history books that I would recommend.

"It wasn't an ideological thing. He wasn't a Salafist jihadist. He didn't use that lexis. It was much more: 'I want to do something.' "

When he emerged from Portland jail in Dorset in 2011 this desire took tangible form. Almanasfi decided he would travel to his father's homeland Syria and join the revolution against President Bashar al-Assad, its horrors vividly depicted on British TV screens.

Hussein said: "He told me: 'I want to do something good for once. I want to do something pure.' I told him: 'You are out on parole. You have a sick mother. Don't do it.' "

Almanasfi ignored the advice. He abandoned the bricklaying course in which he had briefly enrolled, and began figuring out how to slip clandestinely into Syria.

It was at this point that Britain's secret services appeared on the scene. Almanasfi had begun attending a radical mosque in west London. He popped up on MI5's radar, intelligence sources made clear on Friday.

In December, according to Hussein, Almanasfi said that British "spooks" approached him in the street, addressing him politely as "Mr Ali".

"Ali said they seemed to know what he was about. They asked him a few questions. It was a probe. They wanted to know if he was planning to go over." The verb "go over" had only one meaning among radical British Muslims – to join the rebels in Syria. It's uncertain how much the authorities may have known of his intentions.

In January Almanasfi did indeed go over, despite MI5 warnings: he left the third-floor Acton flat he shared with his mum and disappeared. He sent a valedictory text to his half-brother Safwan in Halifax. It read: "I'm off. I love you." He seemed aware of the risks but also confident that he would survive his idealistic adventure unscathed. "He told me about some guys who were killed there. He said these guys were hotheads who didn't know what they were doing," Hussein said.

Almanasfi's final five months in Syria are a mystery. In west London his family reported him missing; police called round at his flat, but found no trace. Like other foreign volunteers – at least 600 have gone to Syria since 2011 from at least 14 European countries including the UK – Almanasfi found it easy to cross the border.

Most probably he entered from Turkey: a short night-time walk across a muddy field and through a hole in a barbed wire fence and then an olive grove. He may have entered legally via the international crossing point at Bab Al-Hawa. All he would have needed to do is to flash his British passport.

Once in Syria Almanasfi made the occasional Skype call home. He turned up in Qusair, near the border with Lebanon; over the past two weeks the town has been the scene of vicious fighting between the opposition and resurgent regime forces supported by Hezbolllah fighters. He appeared in Hama. He seems to have been in Syria's north, possibly holed up in the Akrad mountains in Latakia. We don't know how he met up with Nicole Mansfield, or the other dead foreigner. Their corpses were laid out together on Thursday in a Syrian government morgue.

In Arabic culture it is shameful to disrespect an elder, to beat up an old man an act of terrible dishonour. Almanasfi appeared haunted by this ghost. He looked at fighting for the rebel cause "almost like a redemptive act", Hussein said.