The first collision happened at about 12:20 p.m. just north of the Berkeley Amtrak station and involved train No. 535, which was heading from Sacramento to San Jose, Amtrak spokesman Cliff Cole said.
Cole said the train was given a new crew and, following an investigation into the crash, it continued south from the area at about 1:50 p.m.
At about 2:15 p.m., the same train struck and killed another pedestrian just south of the Oakland station, Cole said.
An Oakland fire dispatcher said crews responded to the crash near the intersection of East 12th Street and 29th Avenue.
Cole said the train was taken out of service and its 15 passengers were transferred to another train.
He said in both incidents it appears the victims were trespassing on the tracks.
Union Pacific spokeswoman Zoe Richmond said Union Pacific police will assist in the investigation into the two fatal crashes.
According to the Alameda County coroner's bureau, an unidentified woman was the victim of the Berkeley crash and an unidentified man was the victim of the Oakland crash.