MADRID, Spain (CNN) --A court in Spain has returned 16 suspected terrorists to jail after a brief hearing on Sunday. Spanish authorities said the suspects all have ties to al Qaeda and were planning "explosive and chemical" attacks.

The 16 were arrested Friday in predawn raids on 12 homes in Barcelona and nearby towns in northeastern Spain.

The exact charges against the men are not known. But Interior Minister Angel Acebes said the suspects were preparing for an attack in Europe. He said four terrorist suspects detained last month in France had "intense contact" with the 16 arrested in Spain.

Spanish Prime Minister Jose Maria Aznar said Friday the suspects were part of "an important network linked to al Qaeda and the Algerian Salafist group."

On Sunday, the suspects appeared before National Court Judge Guillermo Ruiz Polanco. He sent them back to jail based on a judicial order from France accusing them of criminal activity, according to Spanish media, which also reported that France may extradite them.

The court hearings were closed to the public.

In a show of tight security before the court appearances, four policemen in vans pulled up quickly to the courthouse at midday, then two of the vans went into a garage. The vehicles were carrying at least some of the suspects.

Police stood guard outside the courthouse with shotguns.

After the court hearings, two civil guard vans pulled away from the courthouse with the prisoners.

During the raid on Friday, police found chemical material that included "hydrocarbons and synthetic material," which is being analysed by police, Acebes said.

They also seized electronic gear that could be used in attacks, such as remote control devices that could set off bombs.