Police say the teens' car was passing another vehicle when it collided with the truck. ((CBC))

RCMP are trying to determine whether speed or alcohol played a factor in a traffic accident that killed four high school students from Moncton, N.B., police said Sunday.

The teens, all 16-year-old boys, were in a car that crashed into a pickup truck around 8 p.m. Saturdayon Ammon Road just outside Moncton, said RCMP Sgt. Derek Strong.

"They were passing another vehicle on a solid line and unfortunately there was a pickup truck coming the other way and it resulted in a head-on collision," he said.

All four victims were in Grade 11 at Harrison Trimble High School in Moncton, police said.

The collision happened as the truck was coming over a hill, witnesses said.

"The threegirls that were in the car that was being passed were actually friends of the victims, so we were able to get statements from them," Strong told CBC Radio.

A man living near the scene of the crash heard the accident and came out to investigate. Strong said the man called 911 and battled flames in the wreckage using afire extinguisher.

Two people in the pickup truck were taken to hospital and later released, police said.

Strong said the Jaws of Life rescue equipment had to be used to remove the teens from the wreckage. All were pronounced dead at the scene.

On Saturday night, an accident analyst, a reconstruction specialist and other investigatorswere at the scene, taking measurements and photos, Strong said. Autopsies will be performed on the victimsthis week, he said.

Harrison Trimble High School was open Sunday for the community to gather and mourn the losses.

"It's every principal's worst nightmare to get that kind of phone call that you've lost students," said principal Steve Mitton. "I've been through some of these before where it's been one student and that's very difficult. So I can hardly imagine what it's going to be like when we have four to deal with."