Interior Minister Jorge Fernandez Diaz hailed the arrest, saying that "It appears a massacre has been averted."
In a statement, police said they seized 140 kilograms (308 pounds) of bomb-making material when they arrested the 21-year-old man in the Balearic island city of Palma de Mallorca on Wednesday.
Police said that in his personal diary and Internet blog, the man -- a Spaniard only identified by his initials J.M.M.S. -- talked of his admiration for the perpetrators of the Columbine attacks and how he planned to place several bombs around a campus in Palma.
The statement said the man had openly expressed his hatred for society, and particularly students. A police spokesman said there was nothing to indicate that the man had planned to carry out the attack for any set ideological reasons.
Twelve students and one teacher were killed in the Columbine attack in Colorado. The two perpetrators then killed themselves. The Spanish man's diary indicated he had considered committing suicide once he had carried out the attack.
Spanish police said the man had tried several times to purchase guns for the university attack, but finding this impossible then opted to use bombs by buying explosive-making material on the Internet. The statement said he had planned to make shrapnel pipebombs.
The arrest took place just as the material was delivered to his house, the statement said.
Police said they had been watching the man for the past five months after messages referring to Columbine began appearing on Internet pages in Spain.
A police spokesman said the suspect had previously studied electronics at a technical training school and had recently begun a course in business administration. He said he earned money by playing poker on the Internet and had recently moved out of his family house and into an apartment.
The officer spoke on condition of anonymity in keeping with police regulations.