Matthew Morris, 19, whose right leg was severed above the knee, had jumped aboard the Pan Am Railways train while walking along the railroad tracks in the city’s Riverton neighborhood, Portland City Spokeswoman Nicole Clegg said Tuesday.

Shortly after jumping aboard the train, Morris fell off and was run over by it, severing his right leg and seriously injuring his left leg, Clegg said. Morris is expected to survive his injuries.

Morris had jumped the train after it had stopped as part of a regular schedule to allow the Amtrak Downeaster to pass, Clegg said.

Pan Am Railways police and Portland police are investigating to determine if alcohol played a role in the incident, Clegg said. Pan Am Railways Vice President Cynthia Scarano couldn’t immediately be reached for comment Tuesday morning.

Clegg said all train tracks are private property, and people should never attempt to board a moving or stopped train. In 2012, more than 400 people across the country were killed while trespassing on private railroad property, she said.

Police were called at 6:20 p.m. Sunday when Harris Avenue residents heard Morris screaming, and Sgt. Michael Rand, a trained EMT and a member of the department’s Special Reaction Team, responded quickly and was able to control Morris’ bleeding with a tourniquet until paramedics arrived.

“It is believed that the quick action of Sgt. Rand and other first responders saved Morris’ life,” Clegg said.

Morris is hospitalized at Maine Medical Center, and no update on his condition was immediately available.