A train crowded with Egyptians leaving the capital for a religious holiday caught fire and sped on in flames for miles Wednesday, killing 373 people, including some who died as they jumped from the burning cars, police said.

The fire was reportedly started by a cooking gas cylinder that burst and it swept through the last seven of the train's 11 cars. Workers in gloves and masks pulled charred and twisted bodies from the wreckage. Firefighters said some of the corpses were found curled up under seats and dozens more lay alongside the train tracks.

Maher Abdel Wahid, who led a team of state investigators to the scene, said he did not expect the toll to rise much beyond 373.

Officials called it the worst train accident here in decades.

"There has been nothing in the recent or distant past like this," Ahmed al-Sherif, director of the state-owned Egyptian Railway Authority, said at the scene. "I've been with the railway for 32 years and never seen or heard of an event of this size."

President Hosni Mubarak, who was in the Egyptian resort of Sharm el Sheik, was quoted by the Middle East News Agency as expressing his "deepest regret and profound sorrow" to the families of the victims.

The news agency said the cause of the fire was a burst gas cylinder using for cooking in the dining car. But al-Sherif said the cause was still under investigation. He said the train had no dining car, but that passengers often brought gas cylinders and small stoves aboard despite regulations forbidding it.

The train cars had metal frames with wooden seats. Each burned car was jammed with passengers whose clothing and belongings would have been flammable. Some passengers apparently had portable gas cookers.

The cars were separated, but witnesses saw passengers running from car to car, including one women who was on fire. People were likely smoking on board, as well.

Each car designed to hold about 150 passengers was crammed with twice that number, police said, which would have put more than 3,000 people on board. Survivors said the train was so full that they were sitting on the floor. Al-Sherif put the number aboard lower, at about 1,200.

Al-Sherif said the train left Cairo on its 300-mile journey to Luxor about 11:30 p.m. Tuesday and the fire broke out about 1 a.m. Wednesday. The train traveled in flames for 2 miles before finally stopping at Reqa al-Gharbiya, a village 60 miles south of Cairo. Al-Sherif said it was not clear why the emergency brakes were not applied immediately.

The flames were put out hours later as the train sat in Reqa al-Gharbiya. Firefighters said high winds had hampered their efforts.

The fire appeared to have broken out in the fourth car, which was the most badly burned and consumed seven cars before it was extinguished.

Said Fuad Amin, a 22-year-old construction worker, jumped from the burning train and was being treated for a broken hand and a suspected concussion in Ayyat.

He said the first signs of trouble were shouts and screams that he attributed to a fight. Then he saw flames and people running, including a women whose clothes were on fire.

"People were running like crazy," Amin said.

Amin ran, too, until he found a window broken open. He hesitated at first because the train was moving fast.

"I thought I was going to die anyway, so I jumped," he said.

Abdel Wahid, Egypt's prosecutor general, said that if his 25 investigators and 45 coroners determined "there was any kind of negligence, and that's what we are looking into, the punishment will be severe."

Prime Minister Atef Obeid, who came to the scene, told reporters his government "has mobilized all its efforts to help the families of the victims and alleviate their suffering."

The government announced compensation of about $665 for families of the dead and $222 for the injured, but did not admit responsibility.

Mosques were opened to the rescued and villagers supplied blankets, food and hot drinks to the stranded passengers.

The Muslim Brotherhood, the banned fundamentalist movement that is Egypt's main opposition group, questioned how the fire could spread so quickly. Members of the group serving in parliament — as nominal independents — issued a statement calling for an investigation into the "gross negligence that led to this tragic incident."

The Brotherhood has in the past won praise from ordinary Egyptians for its disaster relief efforts. The government, wary of the group's growing popularity, several years ago banned non-governmental organizations from providing emergency aid.

Mohammed Mersi, head of the Muslim Brotherhood faction in parliament, said the group would abide by the aid ban but study what else it could do to help.

Wednesday afternoon, a warning siren blared repeatedly in Reqa al-Gharbiya as workers placed bodies, many burned beyond recognition, into ambulances.

Corpses had melded together in piles on the train. Among charred luggage collected nearby, a Bible, children's clothing and what appeared to be a wedding dress could be seen.

Police said 65 people were being treated for injuries, most in the hospital in the nearest town, Ayyat, 12 miles to the north.

Many of the passengers were going to their home villages for Eid al-Adha, or the "Feast of the Sacrifice," a four-day holiday that starts Friday. The holiday commemorating God's provision of a ram to Abraham as a substitute sacrifice instead of his son is regarded as the most important feast in the Islamic calendar.

Adel Hassan Fadlallah, a 21-year-old laundry worker being treated at Ayyat Hospital, said his car quickly filled with smoke. He jumped from a window and suffered wounds to his head and hands.

Some jumpers weren't so lucky. Ambulance workers say 40 bodies were recovered from along the tracks.

The rail line linking Cairo with southern Egypt was closed indefinitely.

Wednesday's fire was the deadliest train accident in years in a country where such tragedies are common. In 1998, 47 people were killed when a train jumped its rails and slammed into a crowded town square.

Prime Minister Obeid defended the railway, saying the trains were in good shape.

But Egyptian Railway Authority has been plagued by overstaffing and old equipment. It relies on state subsidies to operate some 1,300 trains every day, keeping fares low for poor Egyptians.