CAIRO — A ruptured crude oil pipeline set off a monstrous blaze on a desert highway in Egypt on Tuesday, injuring at least 17 people, local authorities said.

For hours firefighters battled to contain the towering pillars of fire, which burned dozens of cars. Video circulating on social media showed clouds of dense, black smoke billowing over the desert road that stretches from the capital, Cairo, to the city of Ismailia, on the Suez Canal.

Egypt's Health Ministry said 17 people suffering burns and smoke inhalation were rushed to a hospital for treatment, and all hospitals near the site were preparing to receive more injured.

A torrent of crude oil leaked from the broken Shuqair-Mostorod pipeline into the thoroughfare, where a spark from the heavy traffic ignited the fire, Egypt's Petroleum Ministry said. It said authorities managed to close the main valves and extinguish the fire.

The ministry, as well as the country's public prosecutor, said they would investigate to determine the exact reasons for the rupture.

In a phone interview with Egypt's private Sada al-Balad TV, the president of the petroleum pipelines company, Emad Abdel-Qader, said initial reports indicated that an "external party" had possibly punctured the line.

Egypt is not a major oil exporter, but crude and petroleum products flow through its Suez Canal daily. Jordan and neighboring Israel have relied on Egypt's pipelines to meet their energy needs.

Leaks in petroleum pipelines are startlingly common in Egypt, where infrastructure tends to be accident-prone and dilapidated. One third of the population lives in poverty and people sometimes tap pipelines to pilfer fuel for resale on the black market.

In one such accident last fall, thieves were trying to siphon off gasoline in the Nile Delta province of Beheira when leaked fuel caught fire, killing seven.