IF ONE can apply the term to a 78-year-old prelate who has turned lack of ostentation into an art form, then Pope Francis is a rock star. Or at least that is how he is being greeted in Latin America this week. Hundred of thousands have turned up for open-air masses in Ecuador, with more to follow in Bolivia and Paraguay. Yet the eight-day tour—the longest foreign trip so far in this papacy and the first to Spanish-speaking America—may do more than underline the popularity in his home region of Jorge Mario Bergoglio, the first Latin American pope. It may add political definition to his papacy.

Still home to 40% of the world’s Catholics, Latin America has seen a swift advance of evangelical Protestantism in the past 40 years. Yet according to the Pew Research Centre, a think-tank in the United States, Paraguay (where 89% are Catholics), Ecuador (79%) and Bolivia (77%) remain bastions of the faith, along with Colombia and Mexico.

The pope’s most obvious purpose is to keep them that way by making the church more welcoming and more relevant. In Guayaquil, in Ecuador, in a mass celebrating the family (“the best social capital”) he spoke of his concern for those excluded from it—a reference to the quiet battle he is waging for more tolerance towards gay couples and divorcees. The issue will be taken up by a synod in October.

The three countries he is visiting are all fairly small and poor, with large Amerindian populations. They were chosen carefully. Francis, who used to be a Jesuit priest in Argentina, values pastoral work with those on the margins of society, respects popular piety and promises a “poor church, for the poor”.

His words have enthused supporters of liberation theology, a set of leftist ideas that were influential in Latin America in the 1970s and 1980s. Francis speeded up the beatification, which took place in May, of Óscar Romero, a Salvadorean archbishop who was gunned down by a right-wing death squad while celebrating mass in 1980 and is a hero to the left.

Yet Father Bergoglio always rejected Marxism and violent revolution, which some leftist priests supported. Rather than embracing liberation theology, he is reinterpreting it for a post-Marxist age. Romero’s “option for the poor wasn’t ideological but evangelical,” says the Vatican. The pope’s criticisms of free-market capitalism chime both with traditional Catholic social doctrine and with Peronism, Argentina’s populist-nationalist political movement, to which he was once close.

Two of the pope’s hosts, Ecuador’s president, Rafael Correa, and Bolivia’s Evo Morales, are hard-left allies of Venezuela’s authoritarian regime. They proclaim that they will take from the rich and give to the poor, while quietly squelching the opposition. Mr Correa, who calls himself a “Christian leftist”, publicly implied this week that the pope backs his policies. In a barely veiled rebuke to his host, the pope stressed the value of pluralism and warned against “dictatorships, personality cults and the eagerness for sole leaderships”.

Francis has already shown himself to be a highly political pope. His support for the secret talks that led to a diplomatic thaw between the United States and Cuba was crucial. When embassies reopen later this month after 54 years, he can claim some of the credit. He has five times received Argentina’s president, Cristina Fernández, a Peronist with whom he clashed when archbishop of Buenos Aires.

With a presidential election in October (in which Ms Fernández herself cannot stand), those meetings have provoked grumbling from opponents. But the pope is “very subtle in exercising influence in Argentina”, says Sergio Berensztein, a political scientist. His aim in entertaining Ms Fernández is to encourage a smooth democratic handover, avoiding the violence and chaos that have marked political transitions in Argentina in the past.

Some observers worry that the pope is overplaying his hand politically. His plan to go to Cuba—for four days—in September en route to the United States will anger Republicans and risks undermining the American half of that trip.

The biggest test of Francis’s political skill will be whether he can help to bring about a peaceful and democratic transition in Venezuela, where the unpopular government of Nicolás Maduro faces likely defeat in a parliamentary election this year—if it is free and fair. “Behind the scenes he is trying to do everything he can in Venezuela to defuse confrontation,” says Jimmy Burns, the author of a forthcoming biography of Francis. Expect that to include the application of priestly pressure to Mr Maduro’s allies, Presidents Correa and Morales, this week.