A schoolboy has been shot dead and three other students injured after a teenage gunman who was driven by 'bullying' opened fire on a Washington high school today.

The shooting took place at Freeman High School in Rockford, Washington, on Wednesday shortly after 10am.

The teenage gunman opened fire in the hallway, pulling two weapons on students and staff. One of the weapons jammed but he picked up the other and opened fire.

The student who was killed was shot as he bravely tried to talk the gunman out of carrying out the attack, police said. School staff brought the gunman down and he was later arrested by police.

He remains in a juvenile detention center and is being questioned.

The three injured teenagers were taken to Sacred Heart Medical Center and Children's Hospital where they remain in a stable condition.

One will require surgery but doctors say all three are 'doing well'.

None of the victims' ages have been released but the injured youths were described as being in their 'mid-teens'.

Scroll down for video

A student at Freeman High School in Rockford, Washington, shared this photograph of students sitting on the floor during a shooting on Wednesday

Spokane County Sheriff Ozzie Knezovich said the gunman had been bullied and that this fuelled his rampage.

'It sounds like a case of bullying type of situation,' he said on Wednesday afternoon.

He said the boy who died was trying to stop the gunman when he was killed.

'It sounds like he tried to walk up and tell him,"this isn't what you wanna do."'

The gunman is under 18 and is still being questioned.

Other students say that in the days before the shooting, he talked about watching documentaries about other school shootings and had passed notes threatening to 'do something stupid that would get him killed.'

As they were evacuated, terrified students took to Twitter to share frightening pictures of their classmates hiding on the floor.

'At Freeman Elementary currently. I am a junior, evacuated from the high school. At least 4 shot,' one student wrote.

Sheriff's deputies went 'floor to floor', 'room to room' to search the school building to account for all of its students.

At around 11.30am, Fire Department Chief Brian Schaeffer said there was no longer a threat.

'There was a call approximately an hour and 25 minutes ago for a shooter in the school.

'The fire department responded collectively with sheriff's office.

The shooter has been apprehended and is in custody Spokane Fire Chief Brian Schaeffer

'They organized together as soon as they arrived and their mission was to go in and neutralize or locate and neutralize the person who had the weapon and immediately start to care for any victims they found.

'They did that successfully,' he said.

Later, he added: 'Three children were transported to Sacred Heart Hospital. One child is deceased, they remain here.

'The shooter has been apprehended and taken into custody with law enforcement.'

Students were evacuated from Freeman High School in Rockford, Washington (above) shortly after the shooting

A student is seen being taken away from the school after reuniting with her family

Parents were seen taking their younger children out of the nearby elementary and middle school afterwards

Parents flocked to the scene and were forced to wait for news behind police lines

There was a flock of police cars and parents' vehicles shortly after the shooting at 10am on Wednesday

One child who was interviewed outside the school after being evacuated claimed the shooter was one of his best friends.

He said he brought the weapon to school in a duffel bag and that the boy had been watching documentaries about other school shootings before Wednesday's incident.

'One of my best friends brought a gun in a duffel bag to school and I guess three people were shot and 1 was killed and we all hid in the corner of our home room.

'We were all crying and texting. We heard the gunshot and heard everyone running and screaming.'

Other students said the shooter was passing out notes saying he was planning on doing 'something stupid that could get him killed'.

He'd been watching school shooting documentaries Friend of alleged shooter

He said the alleged gunman sent him photographs of a school shooting documentary he'd been watching recently but that he never imagined he would ever commit such violence.

'I was thinking that maybe it wasn't my friend but then I had an idea it was all the documentaries he's been watching and thinking he sent me a picture on Snapchat when we were talking and it was a documentary and I was like: "There's no way he could do this! Now I'm thinking he might actually have gone through with it.'

The three children were rushed to the Sacred Heart Medical Center, 16 miles away.

One girl who was evacuated from the school said her cousin was among those injured.

'She got shot int he side and it's, we don't know if it's lodged in her spine or her colon but we know it's pretty critical,' she told KHQ.

The hospital has since revealed that all students it is caring for are in a stable condition.

'We have three teenagers with us and they're all doing well. They're stable. One will be requiring some surgery this afternoon but that's it so we are thrilled to report that,' Dr. Michael Moore said.

He said the hospital did not know how many students would come through their doors for treatment when they received the first reports of the shooting.

They prepared eight operating rooms, he said, which mostly lay empty.

Spokane County Sheriff's Officers rushed to the scene and went 'floor to floor'. Authorities say the shooter was 'eliminated' but will not say if they are still alive

Terrified parents were told to go to the campus football field to await more information

Washington Governor Jay Inslee said the shooting was 'heartbreaking'. 'All Washingtonians are thinking of the victims and their families.

'We’re grateful for the service of school staff and first responders working to keep our students safe,' he said in a tweet.

Spokane Fire Department Chief Brian Schaeffer said the suspect was in custody

Every other high school in the district was put on lockdown as a precaution shortly after the shooting. They are now safe.

Terrified parents flocked to the school immediately after news of the shooting spread.

Spokane Police immediately closed the highway which approaches the school, forcing some parents to abandon their cars and walk more than a mile to get to their children.

Shortly after 12pm, two hours after the shooting, police began reuniting students with parents who had gathered outside.

FBI agents arrived at the high school on Wednesday afternoon.