Prosecutors said Friday they are investigating suspected terror links of a Moroccan arrested in Spain after the Madrid train bombings because the man briefly lived in Germany.

Authorities ordered a search Thursday evening of an apartment in the western city of Darmstadt where the man was registered as a resident since last October, prosecutors said.

However, the 28-year-old suspect, whose identity was not released, apparently spent "only a few days" in Germany last fall, prosecutors said in a statement.

One of three suspects arrested in Spain this week was enrolled to study electrical engineering at a Darmstadt university, Fritz Behrens (search), the interior minister of North Rhine-Westphalia (search) state, said earlier.

"He apparently lived only for a short time in Germany," Behrens told reporters, without elaborating.

Germany's Sueddeutsche Zeitung daily reported that the man was believed to be a Moroccan and born in 1975 and that the suspect enrolled in Darmstadt last year to study electrical engineering.

People at a Darmstadt (search) residential building said police commandos blew open the door to an apartment Thursday night, then several dozen officers swarmed in and searched the place.

Matthias Conrad, who lives on the floor above, told The Associated Press that a man he described as having Mediterranean features lived in the apartment with his girlfriend.

Conrad said the man had lived there for about two years, but that he had not seen him for some time.

Police also searched the building's basement with sniffer dogs, he said.

German federal prosecutors already have opened an investigation because a German woman was injured in the Madrid attacks.

Germany became a focus of terrorism investigations after the Sept. 11, 2001 attacks on the United States when it emerged that three of the suicide hijackers had lived and studied in Hamburg.