The security official said some of the passengers in Giza, Cairo's twin city, were enraged that they had to wait for more than 30 minutes on their train to allow another train to pass. Some of the restless passengers placed logs and rocks on the rails of the track of the other train that was holding theirs up. When the speeding train approached, the debris caused it to sideswipe another train. Three cars of the fast-moving train overturned.
The official spoke on condition of anonymity because he was not authorized to speak to the media.
The Health Ministry said at least four people were injured, according to the state-run news agency MENA.
Since last year's uprising, there have been numerous protests staged by train passengers demanding better services as well as strikes by railway employees demanding higher wages, often delaying trains for hours and sometimes days.
In January, state-run newspapers reported that 1,720 trains had been delayed because of the protests. Most Egyptians cannot afford air travel, which is also limited to cities with airports, and the country's roads are poorly paved and dangerous, making trains a popular option.
The railway system has a poor safety record that has long been blamed on badly maintained equipment and poor management. Egypt's worst railway disaster took place in February 2002 when a train heading to southern Egypt caught fire, killing more than 370 people.
In August 2006, a passenger train barreling toward a station collided with a second train, killing around 60 people.