Police in southern Spain have arrested a suspect they said was planning a Columbine-style attack at the University of the Balearic Islands in Majorca.

The 21-year-old man was arrested and found in possession of a 140-kg (more than 300-pound) bomb-making kit, the police statement said. He was reportedly planning to plant pipe bombs around the campus after failing to obtain a gun license and purchase guns several times.

Police revealed that they had been monitoring the suspect for five months prior to his arrest after messages about Columbine High School began appearing on Spanish message boards.

Police descended on his home on Wednesday morning, CNN said, just as the suspect, identified by the police and by the Telegraph as Juan Manuel Morales Sierra, a business student, was receiving a shipment of bomb-making materials.

The statement also said the suspect’s diary, which the police seized, explicitly expressed admiration for the teens who carried out the Columbine attacks in Colorado in the U.S. in 1999.

"He showed a hatred for society, especially for university students [given] his decision to strategically place pipe-bombs filled with shrapnel on the university campus," the police statement said.

"He also admitted the hypothesis of suicide while carrying out the massacre," the statement added, but no other ideological reasons for the attack emerged from reading the diary. A spokeswoman for the government said that this was “a completely isolated event,” that Sierra was “not part of any political party or association,” and that everyone should keep calm and carry on, CNN said.

Spain’s Interior Minister Jorge Fernández Díaz praised the police. “It appears a massacre has been averted,” he said.

Sierra was described as “a typical adolescent, who little by little, became more anti-social,” a source told the Spanish paper El País. He lived alone, dressed in a “goth”style, and earned money playing poker online, the Telegraph said.