CAIRO —Two trains traveling south of the Egyptian capital collided Saturday, killing at least four people, officials said.

An error from the switch operator is believed to have caused the accident, security officials said. The two trains, one coming from Cairo and another from the south, were traveling between two villages near Fayyoum, an oasis province 60 miles southwest of Cairo.

The Health Ministry said in comments published by the state news agency that four people were killed and 30 injured. Earlier, security officials had said five were killed.

The officials spoke on condition of anonymity because they were not authorized to brief the media.