1 of 6
Fernando Llano, Associated Press
Accompanied by the Archbishop of Quito Fausto Gabriel Travez, second from right, Pope Francis waves at the National Shrine of Our Lady of El Quinche, where he was to meet with clergy in El Quinche, Ecuador, Wednesday, July 8, 2015. Francis wraps up the first leg of a three-nation South American pilgrimage Wednesday. Next stop on the popeÍs South American tour is La Paz, Bolivia, where he will be welcomed by President Evo Morales.

LA PAZ, Bolivia — Pope Francis arrived in Bolivia on Wednesday on the second leg of his South American tour and immediately insisted that the Catholic Church continue to play an important role in society amid efforts by the government of President Evo Morales to curb its influence.

Francis landed at the La Paz airport from Quito, Ecuador, and was greeted on the tarmac by Morales, children from some of Bolivia's 36 different native peoples, and military and traditional flute bands that played the Bolivian and Holy See anthems.

Morales hugged the pope and hung a pouch around his neck of woven of alpaca with indigenous trimmings. It is of the type commonly used to hold coca leaves, which are chewed by people in the Andes to alleviate altitude sickness. It wasn't known if Francis chewed any leaves, though he was served mate tea made with coca leaves, chamomile and annis on the plane.

La Paz stands at 4,000 meters (about 13,120 feet) above sea level, and the Vatican decided to keep the pope's stay to just four hours to limit any problems for the 78-year-old pontiff, who has only one full lung. Francis though seemed in fine form, bundled against the cold and wind by a white shawl that he donned for his popemobile ride into town past the thousands of people who came to greet him, waving handkerchiefs and singing songs of welcome.

At an airport welcome ceremony with Morales by his side, Francis praised Bolivia for taking "important steps" to include the poor and marginalized in the political and economic life of the country, South America's poorest.

Morales came to power championing Bolivia's 36 indigenous groups and enshrined their rights in the constitution, and under his leadership Bolivia's economy has grown thanks to booming prices for its natural gas. But Morales has roiled the local church by taking a series of anti-clerical initiatives, including the new constitution that made the overwhelmingly Catholic nation a secular country.

In his speech, Francis recalled the Catholic faith took "deep root" in Bolivia centuries ago "and has continued to shed its light upon society, contributing to the development of the nation and shaping its culture."

"The voice of the bishops, which must be prophetic, speaks to society in the name of the church, our mother, from her preferential, evangelical option for the poor," he said.

Morales, for his part, recalled how the Catholic Church in the past was on the side of the oppressors of Bolivia's people, three-quarters of whom are of indigenous origin. But Morales said things are different with this pope and the Bolivian people are greeting Francis as someone who is "helping in the liberation of our people."

"He who betrays a poor person, betrays Pope Francis," Morales said.

Francis and Morales have met on several occasions, most recently in October when the president, a former coca farmer, participated in a Vatican summit of grassroots groups of indigenous and advocates for the poor who have been championed by Francis. Their shared views on caring for society's poorest, and the need for wealthy countries to drastically change course to address climate change, have bumped up against Morales' clashes with the local clergy.

As soon as Morales took office in 2006, for example, the Bible and cross were removed from the presidential palace. A new constitution in 2009 made the overwhelmingly Catholic nation a secular state and Andean religious rituals replaced Catholic rites at official state ceremonies.

In recent weeks, various senior officials have engaged in a heated war of words with a Spanish priest who has demanded that the Morales administration devote more funds to public health.

"There are some challenging issues in terms of Evo Morales taking on a quite combative role against the church, which he sees as a challenge to his authority," said Clare Dixon, Latin American regional director for CAFOD, the English Catholic aid agency. "The church is also questioning some decisions made about development in the country."

Morales had pledged to safeguard the interests of Bolivia's indigenous. But he has alienated lowlands natives by promoting a highway through a nature reserve and authorizing oil and natural gas exploration in wilderness areas. Cheered by environmentalists abroad for his demand that wealthy nations do more to combat climate change, Morales has been under fire at home from critics, including activists in the church, who say he puts extracting petroleum ahead of clean water and forests.

Francis was expected to raise environmental concerns during his Bolivian sojourn, just as he did in Ecuador. Other highlights of the trip include his visit to the notoriously violent Palmasola prison, where a battle among inmate gangs in 2013 left 30 people dead. As in many Latin American prisons, inmates largely control the inside of Palmasola, which teems with some 3,500 prisoners, more than four in five still awaiting trial.

In a deeply personal gesture soon after he arrived, Francis stopped his motorcade along the highway heading into town at the site where a Jesuit priest, the Rev. Luis Espinal, was left in 1980 after being detained and tortured by Bolivia's paramilitary squads.

"Luis Espinal preached the Gospel that brought us freedom," Francis said from his popemobile to a crowd gathered at the site. "May Jesus keep him by his side."

It was a brief but poignant moment, given Francis' own experience with the right-wing military dictatorship in Argentina. Then the Rev. Jorge Mario Bergoglio, he led the Jesuit order there when two fellow priests were kidnapped by the regime, which joined like-minded governments in Bolivia and Paraguay to mount Operation Condor to wipe out and "disappear" leftist opponents.

Morales, an Aymara Indian known for his anti-imperialist and socialist stands, considers the Catholic Church a powerful vestige of the colonial-era servitude from which the indigenous are still trying to recover.

The government made it obligatory to teach other religions in schools alongside Catholicism, the faith of nearly four in five Bolivians. But it lost a major skirmish when it tried to prohibit obligatory Catholic religious education in the 15 percent of schools run by the church.

All official ceremonies in Bolivia are now preceded by rituals venerating the Andean earth goddess Pachamama.

That doesn't square with the Bolivian church hierarchy, which in a 2012 pastoral letter called school texts that refer to Pachamama as a divinity "erroneous and a deviation."

Associated Press reporter Frank Bajak contributed to this report.

Nicole Winfield on Twitter: www.twitter.com/nwinfield