An unidentified man was killed trying to roll under a freight train in downtown San Diego during what may have been a videotaped stunt, authorities say.

The man, who was between 20 and 30 years old, was cut into pieces by a northbound Burlington Northern Santa Fe freight train, which was traveling at about 10 mph (16 kph) at the time and was 62 cars long, San Diego County Sheriff's Detective Ed Macken said.

"He was be-bopping back and forth, and there might have been phones up recording," Macken said. "He was trying to do a maneuver to shoot under a train, and it didn't work."

The train finally came to a stop about 35 miles (56 km) north of the deadly accident.

Macken said the crossing gates were down and warning lights were flashing when the accident happened.

The death highlights an ongoing problem with open, very visible and accessible train corridors in San Diego County, Macken said.

"We've had 22 train suicides and accidents in the last year and a half," he said. "We don't think this one was a suicide, but they all make a big mess."

Passenger and freight trains in both directions were stopped for hours while deputies tried to piece together evidence and find witnesses.

"We're still looking for witnesses," Macken said. "What we know was he was crouched down, bobbing back and forth and then he went for it. Sixty train cars went by and then he rolled under the last two."