Rail passengers fed up at a two-hour delay sparked chaos when they began walking along the track to the nearest station.

Hundreds of furious travellers forced doors open and tried to reach their destinations on foot after they grew tired of waiting outside Preston Park station, Brighton, last night.

Railtrack had to keep the power switched off for a further two hours to ensure passengers were not electrocuted.

Train drivers wandered up and down the line trying to round up deserting commuters and make sure the line was clear before services could resume.

The situation was caused by a mechanical failure on a Thameslink Brighton to Bedford train at 7.30pm, which blocked a number of lines by stalling across points.

Seven Connex South Central trains and one Thameslink service were caught in a jam behind it while workers struggled to move the stricken train.

The power was disconnected to allow maintenance workers on to the line, and after an hour passengers were plunged into darkness when their trains' emergency lights went off.

A British Transport Police spokesman said: "It was absolute chaos.

"Passengers were so fed up and wanting to go home that they got off the trains and walked across the track.

"Railtrack had to keep the power disconnected because obviously people in the vicinity of power lines is not a good mix."

A Connex spokesman said: "People started getting out of the trains by forcing the doors open. If the power had been on they would have killed themselves. Once the trains were moved the drivers had to go up and down the tracks looking for them.

"It caused massive delays as the drivers had to herd people up. The trains were ready to go after a couple of hours but the power couldn't be turned back on because of passengers on the track."

The power was eventually switched back on at 11.30pm. Drivers agreed to work overtime to get passengers to their destinations and extra services were laid on.

John Austin-Locke, from Saltdean, was on a train from Victoria which halted near Preston Park at about 8.20pm and finally reached Brighton at about midnight.

He said: "To start off with everything was extremely good humoured. We played charades and someone passed along a bottle a champagne. But then the emergency lighting went off and we were sitting in complete darkness.

"We thought a crew from the station would come out to reassure people but we got no information. There were old people and young children on board.

"People started forcing open the doors of trains and others who had seemed very sensible to me just followed suit.

"It was stupid but in a way you can't blame them because no one knew what was going on. It was complete chaos."

Mr Austin-Locke said his wife and six-year-old son, who waited for almost four hours at Brighton station, were given no information.

He added: "Back at Brighton there were about 60 people surrounding some sort of official and it looked as if they were threatening to storm the Connex office."