Pope Leo has criticized the treatment of prisoners in Equatorial Guinea, ahead of a visit to a jail known for its dire conditions.

He addressed the Central African nation on Wednesday at a Mass that drew some 100,000 people, including Teodoro Obiang Nguema Mbasogo, the country's leader and the world's long-serving president.

Pope Leo said: My thoughts go to the poorest, to families experiencing difficulty and to prisoners who are often forced to live in troubling hygienic and sanitary conditions.

Oil-rich Equatorial Guinea, a country with a poor human rights record and vast income inequalities, is the Pope's final stop on a four-nation tour of Africa.

In the evening on Wednesday, his last full day of the tour, Pope Leo is scheduled to visit an infamous prison in the economic capital, Bata.

Amnesty International has said inmates in Bata prison are reportedly routinely beaten as punishment. Numerous prisoners have neither been seen nor heard from, and their relatives do not know whether they are alive or dead, the human rights organization added.

During Wednesday's Mass at the Basilica of the Immaculate Conception in the town of Mongomo, Pope Leo urged Equatoguineans to serve the common good rather than private interests, bridging the gap between the privileged and the disadvantaged.

He called for the country's resources to be used to improve the lives of the wider population and not just a privileged few. The Creator has endowed you with great natural wealth. I urge you to work together so that it may be a blessing for all, he said, warning that the future of the country depended on the people's choices.

Obiang's government has also been accused of corruption and diverting the country's oil revenues for the benefit of the elite, which it denies. Watchdog Transparency International has listed Equatorial Guinea as one of the world's most corrupt states, while the World Bank reports that more than half of Equatoguineans live in poverty.

Political opposition in Equatorial Guinea is barely tolerated and is severely hampered by the lack of a free press, as all broadcast media is either owned outright by the government or controlled by its allies.

May there be greater room for freedom and may the dignity of the human person always be safeguarded, the Pope said pointedly. President Obiang, who is 83 years old and seized power in 1979, held a private meeting with the Pope on Tuesday.

During his tour of Africa - in which he visited Algeria, Cameroon and Angola - Leo has spoken frankly and emphatically, blasting tyrants for spending billions on wars and condemning the colonisation of Africa's mineral resources.

Shortly before embarking on the trip, the Pope criticized Donald Trump for threatening Iran. In response, the US president criticized the pontiff as being bad for foreign policy.