Gunmen attacked a train carrying hundreds of refugees, setting a mine in its path and spraying passengers with gunfire in an ambush that killed at least 16 people and injured 56, the news agency Lusa reported Saturday.

When it hit the mine on the tracks, the train derailed and one of the train car burst into flames. The gunmen then opened fire indiscriminately on the survivors, the state-run Portuguese news agency quoted witnesses as saying.

The train was carrying more than 500 refugees fleeing fighting between government and UNITA rebel forces, as well as local passengers. The number of dead could be much higher, authorities told the news agency.

The ambush took place about 100 miles southeast of Luanda as the train headed from the capital to the city of Dondo.

More than three million people – about a quarter of Angola's population – have been driven from their homes by the war that has raged for almost all the 26 years since Angola achieved independence from Portugal.