HAYWARD — One line of BART service between the Berryessa/North San Jose and Lake Merritt stations was stopped and other service was disrupted Thursday morning for more than two hours because of a major medical emergency involving a man hit by a train at the Hayward station, officials said.

BART spokesperson Michelle Robertson said shortly before 10 a.m. that a person had entered the trackway and was struck by a train.

Hayward Fire Captain Martin Barbano said firefighters searching the trackway found blood and other items indicating someone had been struck but could not find anyone. But about 8:42 a.m. an ambulance was called to a location a few blocks away from the station, where the man hit by the train had gotten to on his own.

“He got hit and got himself out,” Barbano said. “It was just shocking he was able to walk away.”

The man had suffered back and shoulder injuries and was taken to a hospital where he was expected to recover, authorities said.

BART said there was no indication of foul play.

The stoppages and disruptions began about 7:25 a.m. But at 9:40 a.m. BART said train service had resumed on all lines.

BART officials said service had been stopped on the Green Line, a Daly City-bound line, between the Berryessa/North San Jose and Lake Merritt stations in Oakland. Orange Line trains, going to and from Richmond, were being turned around at the South Hayward and Bay Fair stations.

Riders were advised to seek alternative routes and BART said AC Transit was providing assistance.

It is the second time this week a major medical emergency has disrupted BART service. On Monday morning the North Berkeley BART station was closed for at least an hour after a woman was struck on a trackway.