Brazil’s veteran left-wing president, Luiz Inácio Lula da Silva, has won re-election after a closely fought presidential run-off, defeating right-wing rival Flávio Bolsonaro, who has refused to concede.

With all votes counted, Lula secured 51.79% against Bolsonaro’s 48.21%, according to Brazil’s Superior Electoral Court.

Bolsonaro questioned the extension of voting hours, describing it as “inexplicable”, and told supporters in Brasilia he would seek to have the election annulled. However, both campaigns had requested that polling stations remain open longer.

Lula and his supporters celebrated what they described as a historic victory. It marks his fourth presidential election win, following two consecutive terms from 2003 to 2010 and his return to office in January 2023.

His campaign regained momentum after losing the first round on October 4, drawing support from street demonstrations and a major social media drive.

The victory also bucks a wider trend in Latin America, where voters have increasingly turned towards conservative leaders.

However, Lula faces significant challenges, including a deeply divided electorate and a Congress described as the most right-wing in Brazil’s democratic era. Bolsonaro’s Liberal Party made the biggest gains in the congressional election.

Foreign policy could also prove difficult. US President Donald Trump’s administration has sought to limit China’s influence in the region, while Lula is widely viewed as friendly towards Beijing.

Bolsonaro had promised closer alignment with Washington, while Lula insisted Brazil would not be treated as another country’s backyard.

Environmentalists welcomed Lula’s victory, fearing Bolsonaro’s policies could have increased pressure on the Amazon from agribusiness and mining.

Lula has pledged to unite the country and pursue a fairer society, but governing with a hostile Congress may complicate those ambitions.