Two people have been airlifted to hospital after a train slammed into an ambulance at a railway crossing in Langley Friday morning.

A witness told CTV News the ambulance appeared to be stuck on the tracks while the train was barreling toward it at 216th Street and Glover Road.

“We heard the train laying on the horn for about 200 metres probably,” said Tyson Hunter.

Hunter said the ambulance driver seemed to be struggling to get around the retractable barricade at the train crossing before the crash.

“The ambulance was trying to inch forward,” he said. “His back end was still on the track and the train cranked him and he spun right around, almost 360 [degrees].”

The RCMP said an attendant in the rear of the ambulance is in stable condition and a patient who was being transported is in critical condition.

"The driver of the ambulance is suffering from some back pain but is otherwise uninjured. No personnel on the train sustained any injuries," Cpl. Holly Largy said in a statement.

Nearby roads were closed in all directions while emergency crews responded to the crash, and motorists were told to avoid the area.

The RCMP has asked anyone who witnessed the collision and hasn't spoken to police to contact the Langley detachment at 604-532-3200.