“THE CAPTAIN has arrived,” chanted thousands of Brazilians on January 1st as Jair Bolsonaro ascended the white marble ramp that leads to the Planalto, the presidential palace in Brasília. Freshly inaugurated, the country’s 38th president looked out over the crowd of flag-waving supporters, soldiers on horseback and besuited statesmen and spoke with the fiery tone that characterised his unlikely political ascent. He vowed to rid Brazil of socialism, political correctness and “ideology that defends bandits”. Unfurling a large Brazilian flag he declared that it would “never be red, unless our blood is needed to keep it yellow and green”. “Mito” (“Legend”), the crowd chanted.

No past president has revelled as Mr Bolsonaro has in the enemies he has made and the offence he has caused. The former army captain praises Brazil’s old military dictatorship and insults gay people, blacks and women. Until recently, his detractors were almost as numerous as his adorers. And yet Brazilians are strikingly optimistic as he takes office. Three-quarters say the incoming government is on the right course, according to Ibope, a pollster. Although the economy is recovering slowly from its worst-ever recession in 2014-16, a poll by Datafolha found that the share of Brazilians who are optimistic about the economy has jumped from 23% in August last year to 65% in December.

That is because they see Mr Bolsonaro, who in seven terms as a gadfly in congress never advanced beyond its “lower clergy”, as a potentially transformational leader. They look to him to overcome the corruption, crime and economic disappointment. In fashioning his government since he won the presidential election on October 28th Mr Bolsonaro has shown some signs that he intends to fulfil that expectation. Some of his plans could change Brazil for the better; others could cause immense damage. The main uncertainties are what the balance will be between the good and the bad, and whether he has the skills and the strength to enact his agenda.

Unlike his predecessors, Mr Bolsonaro has not handed out ministerial jobs to political grandees in order to win their parties’ support for his programme. That delights Brazilians, who voted for Mr Bolsonaro largely because they are disgusted with conventional politicians. Instead, he has assembled a cabinet composed of technocrats, ideologues and military men. Much will depend on how they interact with each other, and with congress. That is hard to predict.

The case for optimism rests mainly on two “superministers”. Paulo Guedes, a former banker with an economics degree from the University of Chicago, will be the economy tsar, leading a ministry that will absorb those of finance, planning and industry. Mr Guedes’s support for deregulation, privatisation, lower barriers to international trade and, above all, reform of Brazil’s unaffordable pension system, could provide a tonic that the economy has long needed. He has assembled a team of market-oriented economists and is expected to push for a law that would give the central bank formal independence.

The new justice minister, Sérgio Moro, is supposed to deal with the two other maladies Mr Bolsonaro has identified: corruption and crime. As the judge leading the Lava Jato (Car Wash) investigations into political corruption over the past four years, Mr Moro became a popular hero. He was responsible for the jailing of Luiz Inácio Lula da Silva, a former president from the left-wing Workers’ Party, who has come to represent everything Mr Bolsonaro and his supporters despise. Lula’s allies say that Mr Moro’s shift from the courtroom to Mr Bolsonaro’s cabinet confirms their suspicions that Lava Jato is a politically motivated witch hunt. But most Brazilians cheered: they expect Mr Moro to take the fight against graft to the heart of government.

He will also be in charge of some of the uglier policies the president has advocated, including lowering the age of criminal responsibility from 18 to 16 and gutting Brazil’s gun-control law, making it easier for ordinary citizens to bear arms. Mr Bolsonaro has encouraged police, who already kill some 5,000 people a year, to kill more criminals. Although state governors, not the justice minister, control the main police forces, Mr Moro will have to decide whether to follow the president in encouraging police violence.

Mr Bolsonaro has stocked his administration with former generals. These include the vice-president, Hamilton Mourão, and the national-security adviser, Augusto Heleno. Mr Bolsonaro’s critics feared that he would militarise politics (Mr Mourão has come close to justifying intervention by the army to keep order in Brazil). But the generals strive to seem pragmatic and democratic. “You can erase from the map any kind of [undemocratic] action by Bolsonaro,” Mr Mourão said in an interview with The Economist. Referring to his earlier justification of military intervention, he said that would happen only if a president called in the army in the case of anarchy or extreme insecurity. “We are not seeing this in Brazil right now,” he added. The military men are in Mr Bolsonaro’s government “because of their technical expertise”, he said.

That is not true of the ideologues, whose outlook is closest to that of Mr Bolsonaro. They include his three sons, the most influential of whom is Eduardo, a congressman from São Paulo who has courted the Trump administration (he met President Donald Trump’s son-in-law, Jared Kushner, at the White House in November). He reportedly urged his father to name as Brazil’s foreign minister Ernesto Araújo, a hitherto-obscure diplomat who regards action against climate change as a globalist plot and advocates a Christian alliance among Brazil, the United States and Russia.

His soul mates include the education minister, Ricardo Vélez Rodríguez, who wants to fight the supposed influence in schools of left-wingers and gay-rights advocates, and Damares Alves, an evangelical preacher who will lead a new ministry of women, family and human rights. She has said that “women are born to be mothers.” Ricardo Salles, the environment minister, calls climate change a “secondary issue” and opposes many of the penalties levied on polluters. After the election the foreign ministry withdrew Brazil’s bid to host the next global climate conference in 2019.

Wonks and ideologues
With incompatible points of view, Mr Bolsonaro’s team of rivals have already begun to argue with one another. Whereas he and Mr Araújo are keen to move Brazil’s embassy in Israel from Tel Aviv to Jerusalem (as Mr Trump has done), the agriculture minister, Tereza Cristina, worries that Muslim countries will punish Brazil by buying less of its beef. She also opposes withdrawing from the Paris climate agreement, as Mr Bolsonaro has threatened to do, perhaps because she fears that Brazil would then lose some of its European customers.

He and the foreign minister are suspicious of China—he has accused the country of wanting to “buy Brazil”. But China is Brazil’s biggest trading partner. It has invested $124bn in Brazil since 2003 and is the destination for 80% of Brazil’s soya, its biggest export commodity. Mr Mourão wants a good relationship with China. Fernando Henrique Cardoso, a former Brazilian president, thinks the pragmatists will prevail in such disputes. “Money talks,” he says. But if Mr Araújo’s neo-crusading policies win out, “we’ll have to pray.”

The odds may be worse for Mr Guedes’s ambitious reform plans. In part, that is because Mr Bolsonaro seems ambivalent about them. In the past, he has shown no appetite to tell voters that their benefits might be cut. For example, he said that a proposal by the outgoing president, Michel Temer, to set minimum pension ages of 65 for men and 62 for women was too harsh. (Currently, both men and women retire on average in their mid-fifties. If they are civil servants, they draw pensions so vast that they threaten to wreck public finances.) He has talked of “slicing” pension reform into politically digestible bits. That might encourage congress to stop at passing the first bit—probably setting a minimum pension age of some sort. But a timid reform would not stabilise Brazil’s public debt, which at 77% of GDP is already too high, and prevent pensions from crowding out more productive spending by government.

Mr Guedes is a genuine free marketeer but has no political experience. Some observers worry that by taking control of the planning ministry, which determines civil servants’ salaries and career paths, among other things, he is taking on more than he can handle.

Getting Mr Bolsonaro’s agenda through congress, where his Social Liberal Party holds less than a tenth of the seats, may be even harder than overcoming the government’s internal divisions. That is especially true of pension reforms, which require amendments to the constitution. Mr Bolsonaro has made that job still more difficult by handling congress differently from the way his predecessors did. Unwilling to engage in the grubby exchange of pork and patronage for political support, he has tried to marginalise political parties and their leaders. He prefers dealing with congressional caucuses, such as those representing the so-called bullet, beef and Bible (gun, ranching and religion) interests. Since the election he has spent more time with friendly groups, like those representing pastors and police, than with parties. He hopes to assemble case-by-case coalitions in congress to pass legislation. Congressmen will bow to popular pressure, he believes. “Once we have the support of the public, congress will follow,” says Mr Mourão.

But there is little popular enthusiasm for reforms. “Can you imagine people taking to the streets in favour of pensions reform?” asks Claudio Couto, a political scientist at the Fundação Getulio Vargas, a university. Unlike the political parties, the caucuses on which Mr Bolsonaro is counting for legislative support have no money and do not whip congressmen in legislative votes. Ricardo Sennes, a political analyst, thinks the odds of passing a pension reform are just 50%. The recent strength of Brazilian financial markets reflects local optimism about economic reform; foreign investors have been wary.

Perhaps realising that enacting his agenda will be harder than he thought, Mr Bolsonaro has lately opened channels with congress’s established leaders. In an inauguration-day speech to congress, more measured in tone than his Planalto stemwinder, he called for a “national pact” between society and the three branches of government to restore growth and family values and to fight crime and corruption. He has wisely said he will not take sides when the lower house and senate choose their presidents; they play a crucial role in negotiating between parties and the presidency. Marta Suplicy, a senator from the centrist Brazilian Democratic Movement whose term ended in December, thinks Mr Bolsonaro will have to go further, by offering congressmen projects that will make them popular among their constituents. That is not the same thing as bribery, she points out.

Mr Bolsonaro’s hopes of being a transformational president depend in part on his ability to couple pragmatism and economic reform. As important will be fighting corruption and crime in ways that reinforce the rule of law rather than undermining it. Achieving those changes will require wisdom and a talent for political management. Little in Mr Bolsonaro’s past suggests that he possesses either quality.