An Islamist militant from Morocco was arrested in the eastern city of Valencia on suspicion of planning terrorist attacks in Spain and other European countries, the Spanish Interior Ministry said Friday.

Mohamed Echaabi, described as a "lone wolf," was detained Thursday after he was detected trying to obtain guns and explosives.

Investigators saw similarities between Echaabi and Mohamed Merah, author last year of a series of terrorist killings in the French city of Toulouse, the ministry said.

Echaabi traveled from Spain to Gaza in January 2011 with plans to carry out a suicide attack against Israeli interests, according to the official statement.

"Lone wolf" operatives are typically Western in their dress and appearance and often flout Islamic strictures against alcohol and pork with the aim of "passing unnoticed" in the societies where they intend to mount attacks, the interior ministry said.

That approach has been endorsed by Ayman al-Zawahiri, who took charge of al Qaeda after the death of Osama bin Laden, the ministry said.

Nearly 200 people were killed and some 1,500 injured on March 11, 2004, when Muslim militants detonated backpack bombs on Madrid commuter trains at the peak of the morning rush hour. EFE