At least 31 people were killed and many others seriously burned in a blaze that engulfed an oil tanker after it was hit by another vehicle in Uganda's capital, Kampala.

Police commander Andrew Kaweesa told AFP news agency on Sunday that many of the victims were scooping or siphoning fuel from the tanker just before the crash.

"We can confirm 31 dead and over 10 others seriously injured in the inferno," he said. "People rushed to take the fuel and in the process fire broke out engulfing the whole area and trapping them."

Numerous motorbikes - some with the petrol tank still on fire - littered the scene of the Saturday evening crash in the suburb of Namungona. Police said many of the victims appeared to have headed to the scene on motorbike taxis.

An AP news agency reporter observed at least 20 badly burned patients in a visit to a nearby hospital. Visitors were being turned away by police and security officials who said doctors and nurses were overwhelmed by casualties.

Musa Ecweru, the Ugandan minister for disaster preparedness, described the incident as an avoidable "calamity".

"We have always told our people to stay away from trucks that involve inflammable products such as petrol,'' he said.

"We thought they would learn from the lessons of the past."

The accident is the worst of its kind in Uganda since December 2001 when 90 people died in similar circumstances in the east of the country, police said.

Source: Agencies