Standing up in an open-top Rolls-Royce while waving to thousands of supporters, Jair Bolsonaro's inauguration on January 1, 2019, marked a dramatic shift in Brazilian politics, after 16 years of left-wing rule.

The outspoken, far-right former army captain was propelled to power by vowing to confront socialist ideology, root out corruption, crack down on crime and revive the sluggish economy in Latin America's largest and most populous nation.

"My country was very close to socialism, which led us to a situation of widespread corruption, serious economic recession, high crime rates and continuous ceaseless attacks against family and religious values that are part and parcel of our traditions," Bolsonaro said in a speech in September before the UN General Assembly in New York.

More:

Heading into his second year in office, observers said the Brazilian president who came to power riding a wave of discontent against status quo politics, has held firm on his hardline ideology at home and abroad, in an approach that has delighted his supporters but alienated some of his allies.

"Bolsonaro was in most ways, what we expected him to be, he held his ground as an anti-establishment president, which is what secured the support of his base throughout the year," said Filipe Carvalho, Brazil analyst with the Eurasia Group.

"He has had a reasonably good year in terms of progress, and he held on to his strong nationalist base of support," Carvalho told Al Jazeera.

Jair Bolsonaro waving as he arrives with his wife Michelle to his inauguration ceremony in Brasilia, Brazil [Amanda Perobelli/Reuters]

When the 64-year-old longtime fringe congressman came into office, many commentators citing his admiration for the Brazilian dictatorship that once ruled the country - cast him as a threat to democracy. But over the course of 2019, the leader who is often compared with US President Donald Trump, has struggled to get many of his proposals approved by Congress, and has seen his popularity slip.

A poll held in December revealed that 30 percent of respondents approved of Bolsonaro, down from 40 percent when he first took office, and the lowest for any elected first-term Brazilian president.

Major victory

But his administration has also secured important economic achievements.

In October, Congress approved a landmark decision to overhaul the country's pension system, handing Bolsonaro a major victory.

Brazil's "extremely generous" pension system, accounts for 40 percent of total federal spending, according to research by Capital Economics. The change, which sets the minimum retirement age at 65 for men and 62 for women, up from 56 and 53, will save the country about $200bn over the next decade.

"It's a really important step to stabilise the country's debt trajectory and try to cut the public deficit," Carvalho said. "And it's a really important nod to investors that this administration is really engaged when it comes to making economic adjustments."

The move capped years of stalled efforts by Bolsonaro's predecessors, and reflected a shift in public opinion. But for a president who once declared that he knows nothing about economics, analysts say, the move is largely thanks to Bolsonaro's economics minister Paulo Guedes, a University of Chicago-trained free-market economist.

Guedes, who has managed to get members of Congress to support his agenda, still has measures pending, including ambitious tax reforms, curbing public spending and selling off state companies.

In another sign that the economy may be slowly turning a corner for the better after six straight years of negative or stagnant growth, Brazil's unemployment rate fell from 12.5 percent earlier in 2019 to about 11.8 percent in August.

A military police officer patrols the Kelson's slum during an operation in Rio de Janeiro, Brazil [File: Pilar Olivares/Reuters]

For Bolsonaro who ran on a law-and-order platform vowing to end years of corruption and spiralling gang violence - his administration has claimed its highest marks in public security. Brazil has the world's highest homicide rate.

Police figures compiled by the Brazilian website G1 show that homicides in the first nine months of 2019 fell by 22 percent, to 30,864 cases, compared with the same period in 2018.

Bolsonaro, who pledged to defend police officers and said those who shoot criminals should be given medals, rather than face legal punishment took to Twitter to congratulate his administration for its role. But experts say the steady decline in homicides precedes Bolsonaro's time in office, beginning after 2017, the most murderous year in the country's history - when nearly 64,000 people across the country were killed in gang battles.

Corruption allegations targeting the president's eldest son, are now threatening another core premise of his campaign.

Prosecutors are pursuing allegations that his eldest son Flavio, when he was a legislator in Rio state, hired phantom employees in a scheme under which he diverted part of their salaries to his former driver to buy two apartments and a stake in a chocolate franchise. In December, police carried out two dozen raids on properties belonging to Flavio, his relatives and former employees.

Flavio says he is innocent and has blasted the probe as a political vendetta against his father's presidency.

Social media master

In another move that could fragment his base, Bolsonaro quit his fractious right-wing Social Liberal Party (PSL) in November to start a new one the Alliance for Brazil (APB).

After months of disagreements among PSL members over decision-making and campaign funds, Bolsonaro announced his new party, in which he would be the party's president and his son, Flavio, would be vice president. The new party is expected to officially launch in March 2020.

But Bolsonaro first needs to gather 500,000 signatures which he and his supporters say they are confident they can achieve through social media, a tool that has proven to be indispensable to Bolsonaro's successful run for president and his continued popularity.

Brazil's President Jair Bolsonaro using his mobile phone during a ceremony at the Planalto Palace in Brasilia, Brazil [Adriano Machado/Reuters]

"Social media is a very important tool for this administration," Thiago de Aragao, director of strategy of Arko Advice told Aljazeera.

Bolsonaro often takes to Twitter, and other social media platforms to publish unscripted cellphone videos to spread his latest rants, which almost instantly receive millions of views.

De Aragao said Bolsonaro has mastered the use of social media.

"In order to be successful on social media, you have to be confrontational," de Aragao said. "If you are just informative, social media is not for you."

De Aragao added that although Bolsonaro's administration has succeeded in mobilising local support on social media, it has been "weak" on foreign relations with allies.

Bolsonaro, a climate change sceptic, has clashed with international leaders Emmanuel Macron and Angela Merkel over Brazil's policies in the Amazon. He has called the teenage climate change activist Greta Thurnberg "a brat" after she added her voice to growing international condemnation.

And in November, he accused Hollywood actor and environmental activist Leonardo DiCaprio of financing nonprofit groups that have been blamed for deliberately causing Amazon forest fires, without providing any evidence. In a statement, DiCaprio denied that he funded the groups involved.

Smoke billows from a fire in an area of the Amazon rainforest near Porto Velho, Rondonia State, Brazil [File: Bruno Kelly/Reuters]

While climate change advocates say the Amazon destruction is nearing an irreversible tipping point, Bolsonaro has promised to allow for the further development of the world's largest tropical rainforest. And as the global spotlight turned to Brazil during the massive fires in August, Bolsonaro dismissed the events as normal practice for clearing pasture and farmland.

Official data gathered by Brazil's National Institute for Space Research shows Amazon deforestation under Bolsonaro's watch has risen almost 30 percent to its worst level in 11 years.

Bolsonaro has promised to reduce Indigenous rights and encouraged the commercial exploitation of their protected lands. Indigenous groups say attacks against them have risen and they have faced violence from illegal loggers and miners.

In December, two Indigenous members of the Guajajara tribe in northeastern Brazil were shot dead in a drive-by shooting, and two others were wounded, not far from where a prominent tribesman who defended the Amazon rainforest was also killed a month earlier.

With three more years left in his term, experts say the 2020 local races could be telling for Bolsonaro's re-election bid in 2022.

His health has also been a cause for concern after he was stabbed in the abdomen during an election campaign rally in 2018, requiring him to spend extensive time in the hospital undergoing several surgeries.

In December, he was hospitalised after falling in his residence in the capital Brasilia. And in September, he took four days off to recover after having surgery to treat complications from the stab wound.

"He is never going to be an outright popular president with the majority of the country," Carvalho from the Eurasia Group says.

"But he can do well if he can keep his base mobilised, and keep the economy growing."