AL-AYAT, Egypt — A train went off the tracks south of Egypt’s capital, Cairo, on Wednesday, killing five people, according to the Health Ministry.

Ministry spokesman Khaled Megahed said 27 people were injured in the accident in the al-Ayat area, about 50 kilometers (31 miles) south of Cairo.

The cause of the accident was not immediately known, but Transport Minister Galal Said said he ordered an investigation.

Railway officials said the first three cars of the train, which was traveling to the southern city of Aswan, derailed. The accident halted train services from Cairo to provinces south of the capital for several hours before they were partially restored.

The accident came during one of the busiest travel times of the year, when millions of Egyptians leave Cairo and other big cities to head to their hometowns and villages for Eid al-Adha, a major Muslim holiday that begins on Monday.