• This visit was an opportunity for Pope Francis to refresh and rehearse the themes that he has wanted to be marks of his pontificate.
Pope Francis drew huge crowds during his three-nation visit to Africa, reflecting the growth of the Roman Catholic Church on the continent.
This was his fourth visit to Africa since he became the pontiff in 2013. His predecessor, Pope Benedict XVI, visited just twice during his eight-year papacy.
The BBC's Religion Editor Martin Bashir accompanied Pope Francis on his visit to Mozambique, Madagascar and Mauritius. Here, he reflects on five things which can be learned from the trip.
1) Compassion for the poor was a key theme
This visit was an opportunity for Pope Francis to refresh and rehearse the themes that he has wanted to be marks of his pontificate.
Much of this year has been overshadowed by the issue of clerical abuse, with the Pope hosting a summit of international bishops in February to seek a uniform approach to an issue that threatens the church globally.
This was followed by Cardinal George Pell's conviction on five counts of sexual abuse - the most senior Roman Catholic cleric to be found guilty of such offences.
Pell failed in his appeal against the verdict, and he was returned to jail to continue serving a six-year sentence.
Escaping from Rome, Pope Francis used the trip to focus on promoting compassion for the poor.
According to the United Nations World Food Programme, 80% of Mozambique's population cannot afford the minimum costs of an adequate diet. It says that 90% of Madagascar's population live on less than $2 a day.
In Mauritius, which by comparison scores more highly on economic development, the Pope repeated his theme of recognising the needs of the poor.
"It is the young who are suffering the most," he said. "They suffer from unemployment, which not only creates uncertainty about the future, but also prevents them from believing that they play a significant part in your shared history."
2) ... as was the environment
Pope Francis was also eager to press the theme of conservationism.
In 2015, he issued the only Encyclical in history dedicated entirely to the environment. Entitled "Laudato Si (Be Praised), On the Care of Our Common Home", the letter argued that scripture teaches care for the planet as well as its people.
It was no accident that he chose to visit Mozambique, Madagascar and Mauritius. The world's fourth largest island, Madagascar has suffered rampant deforestation, with 40% of its forests having disappeared in the last 60 years.
The environmental danger is aggravated because conservationists say that 80% of its plant and animal species are not found anywhere else on the planet.
Similarly, the World Bank says that Mozambique has lost 8 million hectares of forest (about the size of Portugal) since the 1970s and, according to US non-profit organisation Forest Trends, it is now the 10th largest supplier of rosewood to China.
Whether speaking to diplomats or addressing a youth event, the Pope repeatedly stressed humanity's responsibility to protect the planet.
And he used assertive language to make this point.
In Mozambique, he deplored the "tendency towards pillaging and plundering driven by a greed generally not cultivated even by the inhabitants of these lands, nor motivated by the common good of your people".
And in Madagascar, he said: "Your lovely island of Madagascar is rich in plant and animal biodiversity, yet this treasure is especially threatened by excessive deforestation. The last forests are menaced by forest fires, poaching [and] the unrestricted cutting down of valuable woodlands."
3) He holds rock star status in Africa
Organisers said more than a million people gathered at a special open-air Mass in Madagascar. This was yet more evidence that the demographic axis of the Roman Catholic Church is shifting.
The roar of the crowd when Pope Francis arrived on the outskirts of the capital, Antananarivo, would have been more fitting for a rock star than an 82-year-old cleric.
4) He called for migrant workers to be welcomed
The final visit on this trip involved a two-hour flight to Mauritius. At the presidential palace, in the presence of civil servants and the diplomatic corps, Pope Francis referred to the way he felt Mauritius had managed to blend different races and religions.
"Thanks to this brief visit," he said, "I have the pleasure of encountering your people, known not only for cultural, ethnic and religious diversity, but above all for the… ability to acknowledge, respect and harmonise existing differences in view of a common project."
Pope Francis also asked the people of Mauritius to live up to their history.
"I encourage you to take up the challenge of welcoming and protecting those migrants who today come looking for work and, for many of them, better conditions of life," he said. "Make an effort to welcome them, following the example of your ancestors, who welcomed one another."
The purpose of the Pope's appeal in Mauritius, a Hindu-majority nation, was to encourage the economic contribution of migrant workers which he believes will help prevent inter-religious conflict.
5) Plus, he showed his sense of humour
Whenever journalists travel on the Papal plane, Pope Francis comes to the back of the aircraft to greet us about an hour after take-off.
He welcomes the travelling media and then says a few words about the nation we will be visiting together. This normally takes no more than 15 minutes. He then walks down both aisles in order to shake the hand of each member of the press, taking time to greet each of us personally.