The man struck by a trolley and killed along Harbor Boulevard and Schley Street early Thursday was wearing headphones and didn't hear the train's horn, police said.
Officers investigating the death say Christopher Brian Roberts, 29, appeared to have been either on his way to work or just returning from work.
Roberts was found with the earphone wrapped around his neck according to a police spokesperson.
The accident happened directly across from the NASSCO Shipyard but there are several other businesses in the area including restaurants and auto repair shops.
There were no witnesses to the accident but officers said Roberts had to walk around the crossing arm to attempt to cross the tracks.
Trolley service was halted immediately after the accident but service was restored just after 6 a.m. with the trolley traveling past the tarp-covered body laying near the tracks.