A 15-YEAR-OLD student killed two classmates and hit 17 others with gunfire, methodically firing a handgun inside a crowded atrium at his rural Kentucky high school on Tuesday.

“He was determined. He knew what he was doing,” said Alexandria Caporali, who grabbed her stunned friend and ran into a classroom as their classmates hit the floor.

“It was one right after another — bang bang bang bang bang,” she added. “You could see his arm jerking as he was pulling the trigger.”

He kept firing, she said, until he ran out of ammunition and took off running, trying to get away. Police arrested their suspect moments later, leading him away in handcuffs to be charged with murder and attempted murder.

Authorities did not identify the gunman responsible for the nation’s first fatal school shooting of 2018, nor did they release any details about a motive. Kentucky State Police Lt. Michael Webb said detectives are looking into his home and background.

“He was apprehended by the sheriff’s department here on site, at the school, thankfully before any more lives could be taken,” Lt. Webb said.

Seventeen students were injured, 12 of them hit with bullets and five others hurt in the scramble as hundreds of students fled for their lives from Marshall County High School.

The two fatalities were 15 years old: A girl died at the scene, and a boy died later at a hospital, Gov. Matt Bevin said, adding that all of the victims are believed to be students. The deceased victims have been identified as Preston Cope and Bailey Nicole Holt.

The dead boy was among five young men, including three with gunshot wounds to the head and one shot in the chest, who were flown about 193 kilometres to the Vanderbilt University Medical Center in Nashville, Tennessee.

The shooting occurred at the Marshall County High School in Benton, Kentucky, a town approximately 193 kilometres northwest of Nashville.

Nearly 100 children ran out of the school seeking safety, said Mitchell Garland, who rushed outside of his business when he heard about the shooting.

“They was running and crying and screaming,” he said. “They was just kids running down the highway. They were trying to get out of there.”

Many jumped into cars, or ran across fields and down the highway, some not stopping until they reached a McDonald’s restaurant more than a mile away. Parents left their cars on both sides of an adjacent road, desperately trying to find their teenagers.

Ambulances and numerous police cars converged on the school. Officers in black fatigues carrying assault rifles showed up as well. Federal authorities also responded, and Kentucky Gov. Bevin ran out of the Capitol to rush to the school.

Rep. James Comer, who represents Kentucky’s 1st congressional district, tweeted: “My thoughts & prayers go out to the students & faculty at Marshall County High School where there has been a tragic school shooting.”

The gunfire happened in a common area before classes began, according to Brian Roy, the county’s former sheriff, who told the Louisville Courier-Journal he had spoken with people at the scene.

The governor and several people in Benton said they couldn’t believe a mass shooting would happen in their small, close-knit town. But many such shootings across the US have happened in rural communities.

Marshall County High School is about 30 minutes from Heath High School in Paducah, Kentucky, where a 1997 mass shooting killed three and injured five.

Michael Carneal, then 14, opened fire there about two years before the fatal attack at Columbine High School in Colorado, ushering in an era when mass school shootings have become much more common.

“It’s horrifying that we can no longer call school shootings ‘unimaginable’ because the reality is they happen with alarming frequency,” said former Rep. Gabrielle Giffords, who survived being shot in the head in 2011. She called on Congress to strengthen gun laws.

Tuesday’s shooting, moments before classes would have begun, disrupted some happy moments in the noisy “commons” area at the centre of the school, where several hallways meet and students gather between classes.

Lexie Waymon, 16, said she and a friend were talking about the next basketball game, makeup and eyelashes when gunshots pierced the air.

“I blacked out. I couldn’t move. I got up and I tried to run, but I fell. I heard someone hit the ground. It was so close to me,” Waymon said. “I just heard it and then I just, everything was black for a good minute. Like, I could not see anything. I just froze and did not know what to do. Then I got up and I ran.”

Her friend, Baleigh Culp, told the AP in a text message that they were joking and laughing until they heard a loud bang that sounded like someone’s books hitting the floor.

“That’s what I expected it to be, until I saw a body drop on the ground,” Culp wrote. “There was bullets flying everywhere. I ran straight out the door and headed to the highway as fast as I could.”

Miss Waymon did not stop running either, not even when she called her mom to tell her what happened. She made it to the McDonald’s, her chest hurting, struggling to breathe. “All I could keep thinking was, ‘I can’t believe this is happening. I cannot believe this is happening,”’ she said.

Barry Mann said his 14-year-old son was put on a bus and taken to another school for him to pick up.

“He gave me a call as soon as he run out the door and I didn’t know what was happening to him,” he told the AP. “It sounded like his heart was in his throat.”

Mr Garland said his 16-year-old son jumped into someone’s car and sped away before reaching his office.

“Everyone is just scared. Just terrified for their kids,” Mr Garland said. “We’re a small town and we know a lot of the kids.”

The school was reportedly on lockdown as law enforcement officials continued work at the scene.

According to data compiled by the Gun Violence Archive, which relies on media reports and other information, this was the year’s first fatal school shooting, 23 days in to 2018.

“It is unbelievable that this would happen in a small, close-knit community like Marshall County. As there is still much unknown, I encourage people to love each other,” Gov. Bevin later said in a statement.