It was 6.59am on Wednesday when Jair Bolsonaro fired off his first tweet of the day from what must rank as one of the most unusual campaign headquarters in political history.

“While they insist on fallacies, labels and this fixation with the word ‘dictatorship’, more than 14 million people are unemployed, citizens are held hostage in their own homes, there are 60,000 homicides and 50,000 women are being raped each year,” declared the far-right frontrunner to become Brazil’s next president. “This is what the people care about! It’s urgent!”

Sixty-eight minutes later, at 8.07am, a second, 241-character salvo emerged from the fifth floor of one of Brazil’s most exclusive hospitals.

“We want to rescue our long-lost values and get Brazil out of this swamp of violence and corruption they have put us in!” Bolsonaro told his 1.5 million Twitter followers. “Our country can’t take another four years [of this].”

They were just the latest Trumpian dispatches to emerge from São Paulo’s Israelita Albert Einstein hospital, where Bolsonaro has been staying after being stabbed on the campaign trail on 6 September.

Profile Who is Jair Bolsonaro? Show Biography Born in Glicério in São Paulo in 1955 to parents of Italian descent, he served in the army from 1971 until 1988, when he was elected as a city councillor in Rio de Janeiro for the Christian Democratic party. In 1990, he became a federal congressman for the same party. He has since been affiliated with a number of political parties. On 22 July, he was officially nominated as the presidential candidate of the Social Liberal party. Policies Bolsonaro espouses populist and nationalist views that often stray into far-right territory. A vocal opponent of same-sex marriage, abortion, immigration and other progressive causes, he has defended the death penalty and the 1964-85 military dictatorship. On foreign policy, he has said he wants to improve relations with the US. Economically he says he is pro free market and privatisation. Political style Deliberately provocative and polarising. He has praised Gen Pinochet, expressed support for torturers and called for political opponents to be shot, earning him the label of "the most misogynistic, hateful elected official in the democratic world”. In his bid to capitalise on Latin America’s lurch to the right, he paints himself as a tropical Donald Trump: a pro-gun, anti-establishment crusader set on "draining the swamp" and cracking down on violent crime. Controversies On top of repeated calls for a return to dictatorship, he has made equally inflammatory attacks on women, black people, gay people, foreigners and indigenous communities. Earlier this year, he was charged by the attorney general with inciting hate speech. Support and first round victory Bolsonaro has a devout following among some conservative voters, who admire his promises to get tough on rampant violent crime, and won 46% of the vote in the election's first round. Photograph: Evaristo Sa/AFP

When the rightwing populist was attacked – almost one month to the day before the 7 October vote – analysts and relatives alike predicted it would turbo-charge his bid for the leadership of Latin America’s largest country.

Fast-forward nearly three weeks and those predictions have largely come true. Bolsonaro continues to top polls with about 27% of the vote, compared with the 21% of his closest rival, Fernando Haddad from the Workers’ party (PT) of jailed former president Luiz Inácio Lula da Silva.

“As disastrous as it was for him personally … politically it was quite good for him,” said Brian Winter, a Brazil expert and the editor-in-chief of Americas Quarterly.

Jair Bolsonaro in his hospital room in São Paulo, Brazil, which has become his election campaign headquarters. Photograph: Flavio Bolsonaro/AP

“I don’t believe the stabbing caused his support to grow per se. I think what happened was that his loyal base of supporters hardened. Their narrative of ‘everybody is against us’ was reinforced,” Winter added.

But the assassination attempt, which left Bolsonaro on the brink of death and needing life-saving surgery, had also “inoculated” him from negative attacks at precisely the moment opponents had needed to lay siege to his campaign.

Winter said Bolsonaro’s main rightwing rival, Geraldo Alckmin, had intended to spend the last stretch of the campaign “just destroying him” in the media – “and because of the attack they couldn’t do it”.

Bolsonaro, in contrast, appears to have played his political cards wisely since the stabbing, transforming his enforced exile from on-the-ground campaigning into a reality TV-style spectacle that has guaranteed him a place on Brazil’s front pages, day after day.

Unable to take to the streets, he has made his final campaign pitches to Brazil’s 147 million voters in Twitter posts and videos, Facebook live streams and, most recently, a tearful 25-minute interview in which he urged viewers to ditch Lula’s PT and take a chance on him. “I know you are very disappointed with politics. But this is your chance,” Bolsonaro, whose hair had been especially trimmed by a hospital coiffeur, told his bedside interrogator.

Bolsonaro interviewed from hospital

On Wednesday morning six television cameras were trained on the entrance to the hospital and a dozen Brazilian journalists milled around outside waiting for the arrival of family or friends, or an update on Bolsonaro’s condition.

A politically-connected family of three – who did not want to be named for fear for upsetting allies at a sensitive political moment – sat catching some sun on a bench outside the hospital, where one of them was recovering from major surgery.

“I’m crazy to see him,” enthused the patriarch, a wealthy Brazilian businessman with ties to Alckmin’s Social Democracy party (PSDB), who declared that his whole family was now on Bolsonaro’s side.

Why? “We’re worried about this place turning into a Venezuela,” his wife said.

The couple’s daughter nodded in agreement: “We know what the PT did [to Brazil] ... the economy, the corruption and their whole philosophy about just pleasing the poor.

“Our first choice was Alckmin. He has no charisma but he’s competent,” she continued.

But with polls showing that Bolsonaro was the only candidate capable of stopping Haddad though, throwing their support behind him was a no-brainer. “I’m betting on him now,” the patriach said.

Inside, where one employee said 26 guards and eight federal police agents were watching over Bolsonaro, the candidate was preparing to fire off his latest tweet: a link to his YouTube channel where he boasts nearly 900,000 subscribers.

“God willing, from next year we will, together, change the destiny of Brazil,” he said in one recent pronouncement.

The patriarch said he was desperately hoping Bolsonaro was right. “The experience we had with the PT was awful,” he complained. “They distribute poverty to the many, and give wealth to the few.”