By Paul Kirby, BBC News
A child has died and two others have been seriously wounded in a shooting at a school in Finland, police say.
Police said all three victims were 12 and that a suspect, also aged 12, had fled but was later detained.
Parents told Finnish media the shooting had taken place in a classroom at Viertola school in Vantaa, to the north of the capital, Helsinki.
Police said they arrived at the school within nine minutes at 9.17am local time and tended to the three victims.
"One of the victims died almost immediately at this location in the school," head of local police Tomi Salosyrja said. The other two children have been taken to hospital and their condition is described as very serious.
In common with other Finnish schools, children had just returned to classes in Vantaa, just outside Helsinki, after the long Easter weekend. All of those involved are in the sixth grade.
The suspect ran off as soon as police arrived and was eventually detained "in a calm manner" in the northern Siltamaki district of Helsinki at 9.58am. A video taken from a passing car shows the suspect being pinned down beside a road almost 4 kilometres from the school.
Police said he had been holding a firearm which they had taken from him and he admitted carrying out the shooting.
Authorities have now opened an investigation into murder and attempted murder.
Children under the age of 15 are not criminally liable in Finland, so the suspect has not been remanded in custody and will be placed in the care of social services after further questioning.
The suspect is understood to have used a gun licensed to a close relative. Gun ownership is widespread in Finland and children over 15 can have licences to use other people's firearms.
Prime Minister Petteri Orpo described the shooting as deeply upsetting and said it was evident too many young people struggled with their mental health: "We have to be able to tackle these issues sooner."
President Alexander Stubb spoke of his shock. A day of mourning will take place in Finland on Wednesday.
Education Minister Anna-Maja Henriksson was on the verge of tears when she told a news conference that what had happened was a great tragedy. Her thoughts were with the "12-year-old who will never come home from school again".
It was shocking that a child of 12 could get hold of a gun, she said, and once the government had a complete picture, it would consider whether further measures needed to be taken to protect Finland's schools.
Children at the school were told to stay in their classrooms after the attack, while other schools and kindergartens nearby were also instructed to lock their doors.
The shooting brought back memories of earlier deadly attacks, including two shootings and an attack on a vocational school four years ago involving a man wielding a sword.
In 2007, an 18-year-old student shot dead six pupils, the school nurse and his head teacher in the small town of Jokela, north of Helsinki, then the following year another student shot dead nine pupils and a teacher with a semi-automatic rifle at a polytechnic in the western town of Kauhajoki.
The shootings prompted a tightening of gun laws, requiring gun owners to be at least 18, but anyone over 15 can apply for a permit to use someone else's weapon if they have their guardian's permission. Eighteen-year-olds must be considered fit to possess a firearm before being granted a permit.
National Police Commissioner Seppo Kolehmainen said police relied on intelligence to prevent school shootings and in this case were unable to stop it.
Finland is widely known as a country of hunters and gun enthusiasts and has 430,000 licensed gun owners in a population of 5.6 million, according to government statistics. There is no limit to the number of guns that can be owned and the interior ministry says more than 1.5 million are in circulation.
As news of the shooting emerged, parents gathered at the school to pick up their children, although the building where the incident took place remained cordoned off.
Vantaa is Finland's fourth biggest city with some 240,000 residents. Viertola school has 800 students aged seven to 16 of both primary and middle school age on two separate sites, with some 90 staff. The shooting took place at the school's Jokiranta site where pupils aged nine to 13 are taught.
Initially, police said everyone involved was 13 but then revised their ages down to 12.
This story was first published by the BBC.