A 15-year-old killed his parents and little brother in Spain, probably after a fight about bad school grades.

The boy first shot his mother with his father's hunting rifle in the family home in Algoda near Elche in the province of Alicante, said a police spokesman for the German Press Agency.

He then used the gun to kill his ten-year-old brother and two hours later his father.

The triple murder shocked the whole of Spain, and in particular the city of Elche in the east of the country, which has 230,000 residents, like no other crime in a long time.

Mayor Carlos González declared a three-day official mourning over the weekend.

"We are all deeply shaken, the whole city is horrified," González said on television on Saturday after a minute's silence in front of City Hall.

"These are absolutely horrific and inexplicable events."

According to the information available so far, the crime happened last Tuesday.

After shooting his mother and brother, the boy waited about two hours for his father to come home and then shot him too.

The youth dragged the bodies to a nearby shed, the police spokesman said.

He has since confessed to the crime and has been arrested.

The crime went undetected for three days.

The boy stayed away from school during this time and gave the reason that he had been infected with Corona, according to a report in the newspaper “El Mundo” on Sunday, citing the investigators.

The murders came to light on Friday.

When a neighbor asked the boy where his parents were, the student admitted to the murders.

The woman then immediately alerted the police.

Citing the investigators, "El Mundo" and other media reported that the boy was "unusually emotionless and calm" during a first interrogation.

He initially showed no remorse and admitted everything in conversation with officials.

They now want to get to the bottom of the fact and find out, among other things, whether the boy is mentally confused or ill.

According to media reports, the fifteen-year-old's parents blocked Internet access because of his poor school performance.

He also refused to help with the field work.

The police did not confirm these details on request, the investigation was not yet completed, it said.