Spanish officials say a university student arrested on suspicion of planning to imitate the 1999 Columbine killings at his campus is being questioned by a judge in Mallorca.

The suspect, identified only as a 21-year-old Spaniard whose initials are J.M.M.S., was shown on state television TVE as he was escorted to court by police Friday. He was arrested Wednesday.

A court spokeswoman said the suspect entered the courthouse smiling before answering questions posed by an investigating magistrate who would determine what legal action would be taken. The official spoke on condition of anonymity because she wasn't authorized to speak to the media.

Spanish police said the man had tried to purchase guns for the attack, but opted to make bombs from 140 kilograms (310 pounds) of chemicals bought online.