Wearing their best red T-shirts, carrying flags and banners, and buzzing with excitement, thousands of people in this poor, dusty farming town had thronged the main square to see Lula and they screamed and stretched out their hands when he walked on stage.

The bearded, gravel-voiced leftist leader’s rule ended seven years ago, yet he remains the most popular Brazilian president in decades, if not in the country’s history.

“Do you know any phenomenon bigger than Luiz Inácio Lula da Silva?” said Flavio Balreira, 65, using the full name, unusual in Brazil.

The former metal worker, union leader and two-times president once described by Barack Obama as “the most popular politician on Earth” has been criss-crossing Brazil’s semi-arid, impoverished north-east to address adoring crowds like this one in Ouricuri, in Pernambuco state. Lula and his team travel in a fleet of buses, which he calls “the caravan”.

“I want to thank President Lula,” said Francilene da Silva, 44, a maid who benefited from a housing scheme introduced during his eight-year reign.

“There are many who enter government and do nothing. He did something,” said Fabiana de Lima, 36, a smallholder, explaining that a cash transfer scheme that helped 36 million people escape extreme poverty still “holds up” the town. “He helped the poor.”

Lula was born into barefoot poverty less than 300 miles away and his governments transformed the lives of many here. But this is not just a pre-campaign tour before next year’s presidential elections, when Lula hopes to stand for a third term. It is also a fight for his future, his political life and his legacy.

“The caravan is confirmation that it is worth being honest with the people,” he told the Observer, “that it is worth doing what the people want and that it is worth governing for the poorest.”

In July he was handed a prison sentence of nine years and six months for corruption and money laundering – and he faces four more trials, all related to what prosecutors say was his role commanding a “criminal orchestra” involving the state-run oil company Petrobras and contracting companies that flourished during his rule.

If a higher court confirms the decision, he will be unable to stand, even if it decides not to jail him.

A three-year investigation, called Operation Car Wash, into billions of dollars of corruption and kickbacks has jailed politicians from Lula’s Workers’ party and its former congress allies, middlemen and powerful executives. Lula says there is no evidence against him and argues he has been subjected to a politically motivated legal war – “lawfare” – to stop him running. On Friday prosecutors requested his absolution in one of the cases.

The caravan was his response, according to Marcus Melo, a professor of political science at the Federal University of Pernambuco.

“This is about flexing muscles,” Melo said. “By showing strength and popularity, he enhances the credibility of a narrative of politicisation.”

Speakers in Ouricuri said that before Lula’s Workers’ party came to power in 2002, people looted shops through the desperation of hunger when the rains failed. Under Lula, 1.2 million families got water storage systems and nobody has looted in the current, seven-year drought.

“I want them to prove one thing against me,” Lula told the crowd, which sang his name. “I want to take care of the poor.”

He was already leading early polls for next year’s elections and his support has grown further since the sentencing, while internationally a chorus of influential voices argues he is being unjustly targeted, including the human rights lawyer Geoffrey Robertson, who has taken his case to the United Nations Human Rights Committee.

Unlike some jailed during Operation Car Wash, including Eduardo Cunha, the former speaker of the lower house of Brazil’s congress who kept millions of dollars in offshore accounts, the sums involved in Lula’s case are relatively modest, though his party is alleged to have received vast amounts.

His sentence was related to accusations that Lula benefited from about £590,000 in bribes from a construction company, paid in the shape of a seaside duplex apartment, renovated at Lula’s request. Lula has denied ever owning the apartment. “There are no foreign funds, no hidden bank accounts, no luxuries and the apartment where he has lived for 25 years is extremely modest,” said Robertson.

Lula’s family moved to São Paulo when he was seven. He started work as a street vendor at eight, became a metal worker, joined the union and emerged as a charismatic leader who led a series of debilitating strikes in the last years of Brazil’s dying military dictatorship. In 1980 he founded the Workers’ party and lost three elections before winning in 2002.

Brazil rode a commodities boom during his reign, and as consumer spending grew half the population joined a new lower middle class. In 2010, Lula’s last year in office, Brazil’s economy grew a spectacular 7.5%.

It’s the only thing that makes sense for a government, to take care of the poorest Lula

“The poorest know what we did for them,” he said. “It’s the only thing that makes sense for a government, to take care of the poorest.”

That same year, he got his successor, a former Marxist guerrilla called Dilma Rousseff, elected. But the commodities boom ended.

She lacked his chummy – critics say cynical – ability to do deals with the mercenary regional barons who hold sway in Brazil’s fractious congress and after narrowly winning re-election 2014, with public spending soaring, oversaw Brazil’s first deficit in more than a decade. The country lost its investment grade as its economy began to shrink.

In government, Lula enjoyed the support of financial markets. Now he is fiercely critical of Rousseff’s successor, Michel Temer, whose savage austerity programme has slashed benefits to poorer Brazilians, and Lula argues that Brazil should spend its way out of its crippling recession, because developed countries such as Britain also run public deficits.

“I want to thank President Lula,” said Francilene da Silva, 44, a maid who benefited from a housing scheme introduced during Lula’s eight-year reign. Photograph: Dom Phillips/The Observer

“What makes the nation grow is the purchasing power of the people at the bottom, not the rich,” he said. “When you take out a loan for a productive asset, you are making the economy more dynamic. And when the GDP starts to grow, the debt starts to fall.”

After the corruption scandal broke, millions of demonstrators flooded Brazilian streets calling for Rousseff’s impeachment and Lula’s jailing, celebrating when she was removed on charges of breaking budget laws last year. She and Lula argued that the process was a coup, and its credibility was compromised by the high proportion of politicians who voted for her impeachment but who also faced their own corruption charges.

Many of those same politicians voted not to suspend Temer last month when he was charged with corruption in a related case, after being secretly recorded recommending a powerful businessman deal with a close aide later filmed receiving $152,000 in cash in a suitcase.

Robertson said Lula had been targeted by Judge Sérgio Moro, who has become a hero for targeting Brazil’s endemic corruption, especially among a burgeoning right wing that coalesced during the pro-impeachment protests but failed to demonstrate when the more serious charges against Temer emerged. In Brazil, the judge effectively acts as both arbiter and prosecutor.

“The legal system in Brazil goes back to the Spanish Inquisition,” said Robertson. “Justice is not done or seen to be done.”

Here in the north-east, Lula’s supporters were adamant he had been set up. As his caravan rolled through the parched landscape, past cactuses as high as trees, people poured into the highway, stopping the buses, cheering wildly and filming on mobile phones when Lula came out to greet them.

“He was the best president we ever had in Brazil,” said Danilo Gomes, 20, unemployed, one of a crowd in Araripina, where the local mayor had set up a roadblock by a roundabout. “If he was candidate a thousand times, he would win a thousand times.”