KAMPALA, Uganda — A car crashed into a moving gas tanker, sparking a fire that killed at least 29 people and left scores more badly burned, Ugandan police said on Sunday.

Police spokesman Ibn Senkumbi said the gas tanker exploded after colliding with a passenger car late Saturday on the outskirts of the Ugandan capital, Kampala, and that investigators concluded the crash was an accident.

Senkumbi said the gas tanker had been knocked from behind by a car. Gas started leaking, he said, and some passenger motorcyclists stalked the tanker after the driver abandoned it. Then suddenly the gas tanker went up in flames that engulfed nearby cars and scores of people who had swarmed around the vehicle.

"Some people noticed the flow of fuel and they came for it," he said. "In the process there was an explosion. The tanker exploded, killing 29 people on the spot." At least 29 others were left badly burned, he said.

On Sunday morning, police were still looking for dead bodies in a nearby swamp where many of the victims had run to douse themselves after catching fire.

Victims nursing serious burns were rushed to the main referral hospital in Kampala, where an Associated Press reporter counted at least 20 badly burned patients. Visitors were being turned away by police and security officials who said doctors and nurses there had been overwhelmed by the number of casualties from the gas explosion.

Explosions involving moving gas tankers happen frequently in this poor East African country, often killing those who rush to the scene with plastic cans hoping to steal fuel.

Musa Ecweru, the Ugandan minister for disaster preparedness, described the incident as an avoidable "calamity," saying it was unfortunate that some people had failed to learn from past mistakes.

"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."