Wearing a red sweatshirt emblazoned with the image of a Brazil’s former president Luiz Inácio Lula da Silva, Fernando Haddad and his entourage piled out of a minibus and marched up the main street of the Rocinha favela, as a band in orange overalls beat out samba rhythms.

Haddad, an earnest intellectual, expert in Marxist theory and former mayor of São Paulo, has until 7 October to convince 147 million Brazilian voters he should be their next president – even though one recent poll showed that more than a third of them have no idea who he is.

Haddad’s leftwing Workers’ party (PT) is hoping that Lula – who last week dropped his prison-cell bid for re-election – can transfer enough votes to his protege to get him through to a runoff vote on 28 October.

Haddad has centered his campaign on a promise to reverse swingeing austerity measures and boost spending to drag the country out of its worst ever recession.

“We combine fiscal responsibility with social responsibility,” Haddad, 55, told the Guardian. “We are not going to sacrifice the people any more. Without public investment, without families spending, without cheap credit, the economy won’t recover.”

But swapping a formidably popular former president for a candidate who many still do not know is not going to be easy.

The PT appeared to recognise the scale of the challenge in a recent campaign video, which shows Brazilians struggling to say the candidate’s name before learning to repeat: “Haddad is Lula, Lula is Haddad.”

Lula was awesome. Many people will vote for whoever he says Antonio Casanova, taxi driver

Until this month, when Brazil’s top electoral court barred him from running, Lula was campaigning from behind bars after he was given a 12-year sentence for corruption and money laundering.

Haddad was only confirmed as the PT candidate on 11 September – less than a month before the election; he has a lot of ground to cover, and not much time.

The latest polls suggest that he is about 10 percentage points behind the far-right candidate Jair Bolsonaro, who is still in hospital after he was stabbed during a campaign event.

In Rocinha, some voters had already decided for Haddad. “Of course I will vote for him, my whole family will,” said Regina Carvalho, 55, minding a street stall.

“Lula was awesome,” said Antonio Casanova, 37, a motorbike taxi driver. “Many people will vote for whoever he says.”

But even in Lula’s home state of Pernambuco, many residents shook their heads when asked to identify his replacement. In Brasíia Teimosa, a heavily pro-PT favela in the city of Recife, Maria do Carmo da Silva, 63 apologised as she struggled to name the party’s candidate – even though a large propaganda sticker of Lula and Haddad adorned her seafront home.

Despite knowing nothing of Haddad’s background, Da Silva said she would back him “because he’s from Lula’s party. I’ve seen him on the television promising that he will do what Lula did. I trust him.”

Her neighbour, 70-year-old Maria José dos Santos, was also unable to name Lula’s stand-in but agreed. “I can swallow him,” the retired maid said. “But I’d prefer Lula.”

Others were less certain. Social worker Luiz Ferreira said he admired Lula for helping the poor even though he believed he was guilty of corruption. “But I’m not voting for Haddad. For starters, I don’t know who he is,” he said.

The son of a Lebanese shopkeeper father and teacher mother of Lebanese descent, Haddad and his dentist and academic wife Ana Estela have two children. He graduated in law, before taking a master’s in economics and a doctorate in philosophy at the University of São Paulo.

In Recife, Maria do Carmo da Silva said she would back Haddad, ‘because he’s from Lula’s party’ – despite knowing nothing of Haddad’s background. Photograph: Tom Phillips/The Guardian

Professor José Álvaro Moisés, who helped judge his thesis on orthodox Marxist theory, described him as “a very serious, competent person”. But he added: “I don’t agree with his theoretical points.”

Haddad’s biggest advantage is that his political patron is the most successful politician in the country’s recent history. But it’s also his biggest problem: many Brazilians still love Lula for helping bring 36 million people out of poverty during the country’s boom years – but others despise him for the rampant political corruption and the economic bust that followed.

A third of electors say they would vote for whoever Lula recommends. Another third would not vote for Lula under any circumstances.

Top PT figures have said Lula would choose all the ministers in a Haddad government – and receive a presidential pardon. Haddad, who is registered as Lula’s lawyer, regularly visits the former president in prison and said he doesn’t want a pardon.

“He wants his innocence declared, because he did not commit a crime,” Haddad told the Guardian. But he said nothing to clear doubts over Lula’s possible role in a future government. “Why would I stop talking to someone I have known for 20 years, and who I judge to be innocent?” he said.

Both men oversaw their party’s manifesto, which promises to overturn austerity measures and privatisations introduced by Michel Temer’s conservative government, and pledges to kickstart a moribund economy with infrastructure works financed by $40bn of Brazil’s international reserves.

It also calls for tax cuts for the poor, higher taxes for the rich, increased protections for LGBT people and demarcation of indigenous lands.

Haddad said he has been quietly meeting investors spooked by fears that a PT government won’t address Brazil’s huge deficit. “The debt can increase a little in two years then go back to declining,” he said. “Serious people really trust our governments because we already ran the country for 12 years.”

Under Lula, the economy surged thanks to a commodity boom which also enabled massive poverty-relief programmes. But under his successor Dilma Rousseff, commodity prices fell and Brazil tumbled into a crippling recession, exacerbated by the impacts of a sprawling corruption scandal, which ensnared top PT figures and their political allies.

Fury over corruption propelled Rousseff’s impeachment in 2016 for breaking budget rules. Leftists maintain this was a judicial coup.

Plenty of Brazilians feel the case against Lula – a separate scandal involving a seaside apartment allegedly given to him by a construction company – was either concocted to remove him from the race or was simply unfair, given the vast amounts pocketed by other politicians.

Yet only the most loyal partisans believe PT protestations that only isolated party figures were involved in what prosecutors described as an institutionalised, multi-party, multibillion-dollar corruption network.

On the evening of his Rocinha visit, Haddad faced aggressive questioning on TV Globo’s flagship news programme over PT corruption in general and charges he faces over allegations of illegal donations in his 2012 mayoral campaign.

Visibly sweating, Haddad struggled to answer, before racing to a rally in central Rio where speakers angrily accused the TV network of being part of the same rightwing conspiracy that toppled Rousseff.

Standing in the crowd, street vendor Wendell de Oliveira, 23, admitted that he was unsure about Haddad, who lacks Lula’s earthy charisma but delivered a powerful, impassioned speech.

As the crowd cleared after the rally, a couple danced to Haddad’s folksy campaign song in the light rain, De Oliveira changed his mind. “I would vote for him,” he said.

Additional reporting by Tom Phillips in Recife