Pope Benedict has ended his trip to Africa by telling Angolans they must denounce the evils of war, and has expressed sorrow for the deaths of two women in a stampede at the weekend.

Enduring intense heat, the biggest crowd of the pope's week-long tour gathered for mass near the capital, Luanda.

The Pope told hundreds of thousands of Angolans they should rebuild their nation after decades of civil war.

He denounced the evils of war and referred to the "murderous fruits" of tribalism and ethnic rivalry.

Angola is considered to have one of Africa's most corrupt governments; President Jose Eduardo dos Santos has ruled the country for 30 years and poverty remains endemic despite Angola's oil wealth.

The huge mass in Luanda was carefully stage-managed and security was extremely tight following the death of two women who were crushed as they tried to enter a stadium to hear him speak on Saturday.

Pope Benedict offered his sympathies to their families and friends.

"I offer ... my deep sorrow, because they were coming to meet me. I pray for the wounded," he said at the start of yesterday's giant service.

Catholics make up more than half the Angolan population.

The mass was the last major event of his two-nation tour, which began on Tuesday in Cameroon and sparked controversy before he even landed, when Pope Benedict told reporters on the plane that condoms were aggravating the AIDS crisis.

The pontiff has condemned the practice of witchcraft in Angola and elsewhere in Africa, and urged his followers to convert more people to the faith.

He has also used his African trip to urge the continent's leaders to fight poverty and corruption.