Brazilians have voted in the first round of their country's most polarised election in decades, with leftist Luiz Inacio Lula da Silva favoured to beat right-wing incumbent Jair Bolsonaro.

Thousands have queued in Dublin to cast their votes, with an English language school on North Great George's Street operating as Ireland's only polling station.

Most polls have shown Mr Lula with a solid lead for months, but Mr Bolsonaro signalled he may refuse to accept defeat, raising fears of institutional crisis or post-election violence.

A message projected on Rio de Janeiro's Christ the Redeemer statue ahead of the vote read: "Peace in the Elections."

Most opinion surveys favoured Mr Lula, who was president from 2003 to 2010, by 10-15 percentage points. If he wins more than 50% of valid votes, which several pollsters show within reach, that would clinch an outright victory, foregoing a second-round vote.

A winner could be announced within hours of polling stations closing at 5pm Brazil time (8pm Irish time).

If no candidate wins more than half of the votes, excluding blank and spoiled ballots, the top two finishers go to a 30 October run-off, prolonging the tense campaign season.

Luiz Inácio Lula Da Silva gives a thumbs up as he casts his vote

Mr Bolsonaro has threatened to contest the result of the vote, after making baseless allegations of fraud, accusing electoral authorities of plotting against him and suggesting the military should conduct a parallel tally, which they declined to do.

A decisive victory by Mr Lula today could reduce the odds of a tumultuous transition.

Critics of Mr Bolsonaro say another month of his attacks on the democratic process could spur social unrest like the 2021 assault on the US Capitol by supporters of former president Donald Trump.

Mr Bolsonaro says he will respect the election result if voting is "clean and transparent," without defining any criteria.

Officials organise the distribution of electronic voting machines in Jardim Botanico

Brazilians were also voting today for all 513 members of the lower chamber of Congress, a third of the 81 members of the Senate and state governors and legislatures.

Though Mr Lula was leading the presidential race, the conservative coalition backing Mr Bolsonaro is expected to hold a majority in both chambers of Congress. That could present challenges for the leftist to govern a country with rising hunger, high unemployment and an uneven recovery from the Covid-19 pandemic.

Mr Lula and Mr Bolsonaro have both promised more generous welfare spending next year, adding to pressure on the federal budget and leading both to look at alternatives to current spending rules.

The newly established autonomy of Brazil's central bank and Mr Lula's choice of a centrist former rival as running mate have reassured some investors that he would not trigger a disruptive break in economic policy.

Jair Bolsonaro (C) waves at supporters during a motorcade in Joinville, Santa Catarina State

Mr Lula has vowed to make a sharp departure from Mr Bolsonaro's environmental policies after deforestation in the Amazon rainforest hit a 15-year high. Mr Lula has pledged to combat logging, step up protection of the biome and local tribes, and make Brazil a protagonist in climate diplomacy.

As in past elections, Brazil's military has been mobilised to heighten security at some 477,000 polling stations, using electronic voting machines that allow for swift tabulation of results by the national electoral authority (TSE).

Following Mr Bolsonaro's criticisms of Brazil's voting systems,the TSE invited a record number of foreign election observers, including first-time missions from US observers at the Carter Center and the International Foundation for Electoral Systems (IFES).