Pope Francis on Saturday made an impassioned plea to Madagascans to protect the Indian Ocean's unique environment from "excessive deforestation" on the second leg of his African tour.
Weeks after a spike of fires in the Amazon, the Argentine pontiff told his hosts they should "create jobs and money making activities which respect the environment and help people escape poverty."
Madagascar -- famed for its immense diversity of flora and fauna -- is home to 25 million people, the vast majority of whom live in poverty with an income of less than two dollars a day.
More than half of its young people are out of work, even if many boast good qualifications.
The pope said there "were many causes driving excessive deforestation which benefits just a few people... and compromises the future of the country."
The authorities should also ensure social justice, he added.
Madagascar's British ambassador Philip Boyle told AFP the country loses around 200,000 hectares of forest each year, adding that "most of the tropical rainforest could disappear by 2040".
"The alarm has been raised by the pope and we are ready to take on the challenge," environment minister Alexandre Georget told AFP.
He said Madagascar would do more to prevent forest fires, and use tree-planting drones and aerial seed bombing techniques to restore its forests.
"In six months we reached an objective of planting 40,000 hectares of land (98,000 acres), but this is pointless when there are forest fires" said Georget, adding that laws would be enforced and farmers made more aware of the issue.
After the welcoming ceremonies, the pope recited a midday prayer with a group of sisters before meeting the bishops of Madagascar in Andohalo cathedral, the country's biggest church.
Political instability in Madagascar has done nothing to help the development of an economy largely dependent on agriculture, and the export of vanilla and cocoa in particular.
Liberal-leaning president Andry Rajoelina was elected to a second term last year mainly on promises of jobs and housing.
"Corruption and inequality outrage us," said Archbishop Desire Tsarahazana, addressing the pope in his welcome speech.
"And insecurity remains a very worrying issue. We cannot keep quiet without acting. Each one of us can change something at his level."
At Antananarivo's Soamandrakizay stadium, thousands of young people gathered ahead of a vigil with 120,000 scouts. They waited for hours in the heat.
"I am here to ask for the pope's blessing to face the harsh realities of life, insecurity, poverty and corruption," said 17-year old student Njara Raherimana, who travelled hundreds of kilometres for the event.
"All this gives me hope for change in my country," echoed another student, Antony Christian Tovonalintsoa, who lives in the outskirts of the capital.
"This vigil will raise young people's awareness about their role (in society) and about avoiding manipulation by old politicians."
800,000 faithful expected
Sunday will mark the high point of Francis' visit with a huge mass in the capital expected to be attended by some 800,000 faithful.
Many had already started setting up tents on the outskirts of the city on Friday, armed with posters of the Argentine pontiff.
Prospere Ralitason, a 70-year-old farm worker, arrived with some 5,000 fellow pilgrims from the central eastern town of Ambatondrazaka, 200 kilometres (125 miles) away.
"We are tired, but it's worth making all these sacrifices to see the pope with our own eyes and receive his blessing," he told AFP, impatient to set out on the final two-hour hike on Sunday to attend the mass.
"We spent 65,000 ariary ($18/16 euros) and brought three kilos of rice to make the trip to Antananarivo," said another pilgrim and farm worker, Jean-Claude Rabemanatrika, 40.
"There are five of us at home and we don't have enough money so we had to choose just one family member to make the trip."
"We've provided toilet, showers, a sick bay and somewhere to cook for our 5,000 guests," beamed Marino Andriamasy, 35, who is in charge of the makeshift site where the pilgrims are staying.
John Paul II
The last pope to visit was John Paul II 30 years ago.
"I was a lieutenant when I helped with the security of John Paul II in 1989. Today I am a divisional general and overseeing security for Francis' visit to Madagascar," said Samuel Rakotomalala.
Some 700 police officers will be deployed at the site, which is also equipped with 200 surveillance cameras and the 12,000 young scouts will also help out.
In June, 16 people were killed and dozens hurt in a stampede outside a sports stadium in the capital during a free concert.
Francis visited Mozambique earlier in the week. He is also due to travel to the island of Mauritius, which like Madagascar is situated off the eastern coast of Africa.