A fuel tanker crash on a ring road around Cairo caused a large fire on Wednesday that killed at least 31 people, Egyptian authorities said.

The blaze also injured at least 21 people and charred more than two dozen cars and motorcycles, according to the latest figures from the health ministry.

State media reported that the fire started when the fuel truck overturned. The health ministry said the crash happened in Waraq, a densely populated neighbourhood in Giza, part of Greater Cairo.

Ahmed Sameer, who was stuck in traffic after the road was blocked, said he saw at least eight bodies removed from burned cars. "It was a huge fire, the cars got stuck together because of the fire," he said. "It was a shocking scene."

Egyptian President Abdel Fatah al-Sisi expressed his condolences to the victims in a statement. The public prosecutor's office said DNA investigations were under way to identify the victims.

Health Minister Khaled Abdel Ghaffar said the injured were taken to nearby hospitals and that the death toll was preliminary and could rise. He later travelled to the scene and the hospitals, the ministry said. His spokesperson told the state-linked Al-Qahera News that the ring road had reopened and the wreckage had been cleared.

The report notes that traffic deaths claim thousands of lives each year in Egypt, which has a poor transportation safety record. Speeding, bad roads and weak enforcement of traffic laws are cited as the main causes of most crashes.