Right-wing president-elect Jair Bolsonaro has his work cut out after storming to a widely-expected victory in the Brazil election on Sunday, as he faces a Congress dominated by lobbies and hamstrung by weak parties.
After a bitter and polarised electoral campaign, the ex-Army captain must also find a way to inject life into a stuttering economy and combat rising violent crime. His approach to that latter question will come under particular scrutiny given his campaign pledge to legalize the carrying of guns.
The first task will be to tackle the soap opera that has become Brazil's Congress, a burden Bolsonaro's predecessors struggled to get a grip of. With almost 30 different parties and legislators who negotiate allegiance based on the distribution of official posts, it's a spider's web of intrigue.
However, Bolsonaro's Social Liberal Party (PSL) did well in the legislative elections on October 7, swelling their ranks from eight to 52 deputies out of 513 in total. That made the PSL the second-largest party in Congress, with the possibility of forming the biggest block through alliances with smaller conservative parties.
He is also backed by conservative pressure groups including the farming industry, Evangelical Christian lobby and the army, none of whom have any particular voting loyalties.
Some experts calculate that he could rally around 300 deputies behind him, close to the three-fifths (308) majority needed to make constitutional changes.
"Bolsonaro's lucky that this Congress has a much more conservative profile," consultant Leandro Gabiati told AFP.
Relaunch the economy
The markets have reacted positively to Bolsonaro, expecting him to nominate as finance minister his economic guru Paul Guedes, who has promised to accelerate a massive privatisation plan aimed at revitalising the public accounts.
Bolsonaro has insisted that certain industries are untouchable, though, including the state oil and energy providers, Petrobras and Electrobras.
"It's not easy," warned Gabiati. "He's taking on a country with a critical fiscal situation."
The analyst said Bolsonaro faces the "challenge of reactivating the economy very quickly."
Though much of his recent rhetoric has been inflammatory – a week ago Bolsonaro threatened to give the left two choices: "Either they'll walk [go into exile] or they'll go to jail" – he then softened his tone, promising in his victory speech to defend "the Constitution, democracy and freedom."
Prior to his election he brushed off his more bellicose bombast as typical electoral bravado, telling the digital platform Poder360 it was "for people who've already shown their support for us."
But speaking from his home on Sunday he pledged to follow "the Bible and the Constitution," while vowing to be tough on "the extremism of the left."
Fight against crime
One of his more controversial campaign promises was to give police and the military "judicial protection" when exercising their duties.
"If one of ours, civilian or soldier, is attacked... and fires off 20 rounds into the attacker, he needs to be decorated and not brought before the courts," Bolsonaro said in August.
That left human rights organisations worried about the effects such a policy could have during operations into the notorious favelas aimed at rooting out gangs, in which the police have many times been accused of heavy-handedness.
Bolsonaro has also said he'll let "good people carry weapons," but without revealing who they are and how anyone would be deemed fit to qualify. That's been a popular campaign call, though, given the country saw a record 63,800 murders last year.
Rural land conflicts
Rich landowners stand to benefit from a Bolsonaro government after he vowed to label as "terrorism" the occupation of properties, a traditional arm used by the Rural Landless Workers Movement (MST).
During his campaign, Bolsonaro also threatened to close MST schools, branding them "guerrilla factories."
Indigenous people would likely have greeted Bolsonaro's election with dismay as he's in favour of cancelling demarcations of indigenous land, much of which is in the Amazon region.
He's also given support to the idea of opening up such protected land to massive road or hydroelectricity infrastructure projects that could result in the displacement of indigenous populations, a project that would have international as well as national ramifications.