Spanish police have arrested a former British rapper turned Islamic State extremist, Abdel-Majed Abdel Bary, one of the most wanted militants in Europe, in a counter-terrorism swoop on Tuesday.

British and other sources confirmed his identity a few hours after the national police agency in Madrid said it had arrested an Egyptian national and two other men in a flat in the southern Spanish city of Almeria.

Originally from Maida Vale in London, Bary was a joint British-Egyptian national but he was stripped of his UK citizenship because of his links to the terror group. Once considered a notorious Isis figure, he had disappeared from view in recent years.

One source said he had been arrested shortly after entering Spain from Algeria, but this could not immediately be confirmed.

A video posted by the Spanish national police showed three men being led away from a flat with their faces covered. A police statement described one of the men arrested as among the most wanted Isis fighters in Europe.

Bary, 29, is the son of Adel Abdel Bary, who was convicted of US embassy bombings in Kenya and Tanzania that killed 213 people. The younger Abdel Bary was a vocal supporter of Isis from 2013 to 2015. In that time he posed with a severed head and frequently menaced the west in social media posts.

There was speculation at the time that he could be the hooded militant nicknamed Jihadi John, who beheaded a number of western hostages on camera. However, that person was later revealed to be Mohammed Emwazi. Abdel Bary knew Emwazi – and four other men branded by their captors as the Beatles – through west London Islamic circles, but he is not thought to have worked closely with them in Syria.

Abdel Bary disappeared for years, leading to speculation that he had been killed as the group’s so-called caliphate crumbled from late 2015.

Turkish police, whom British officials had asked to hunt for Abdel Bary, said they lost track of him by late 2015. There were suspicions he had used the then highly active migrant route to smuggle himself to central Europe via Greece.

Abdel Bary is thought to have had a Spanish girlfriend whom he met online sometime in 2017. By then he is believed to have resumed an online presence using numerous aliases.

During a brief career as a rapper in London he was known as Lyricist Jinn and L Jinny, and he performed with a group called the Black Triangle. After immersing in his faith, he denounced his former life and friends. He left his family and five siblings for the Isis stronghold of Raqqa in July 2013.

A Home Office official said there was nothing to add to the Spanish statement.