Messages of condolence are starting to pour in on social media pages after a young man was struck and killed by a train Monday.

RCMP said 19-year-old Daniel McPherson was walking along some train tracks near Leduc Monday afternoon, when he was struck by the train.

"We believe he was walking southbound, wearing headphones, and didn't hear the train approaching," Const. Jodi Heidinger with Leduc RCMP said Tuesday.

Police were called just before 3:30 p.m. Monday, after reports of someone being hit by a train east of 50 Street, and north of Rollyview Road in Leduc.

"We heard the [train's] horn just going for an extended amount of time," Witness Sheri Friesen said of the moments leading up to the collision. "Then [I heard] kind of a thud."

RCMP, the local fire department and Emergency Medical Services arrived a short time later – and confirmed McPherson had succumbed to his injuries on the scene.

"Our crew did everything within their means to alert the individual," Canadian Pacific Rail spokesperson Kevin Hrysak said.

The 19-year-old is being remembered as a funny, light-hearted guy by friends and staff at Leduc Composite High School.

McPherson's death came as a sudden shock to the principal of his school.

"He left school at 3:15 yesterday," Principal Bill Romanchuk said. "By 3:30 he wasn't with us anymore,

"So it was really tough."

Romanchuk told CTV News the teen had only recently returned to school to complete his high school diploma.

"He was coming back because that's what he wanted to do," Romanchuk said. "He didn't have to come back."

Messages of condolences have been posted on the young man's Facebook page, and staff and students at the victim's high school have set up a memorial.

CP Rail said the tragedy is a reminder to pedestrians to be careful around train tracks.

"It is an unfortunate reminder to stay safe around railway properties," Hrysak said.

A witness of the collision said she hopes this shocking incident gets the message through to youth who often walk along the railroad tracks.

"A lot of kids, unfortunately, do walk up and down the tracks, even though they've been told specifically not to," Friesen said.

With files from Bill Fortier