RIO DE JANEIRO (AP) — Brazilians voted for mayors and councilors nationwide on Sunday in an election that could be an early indicator of President Jair Bolsonaro’s prospects if he runs for re-election in 2022.

About 148 million people were eligible to vote in Sao Paulo, Rio de Janeiro and thousands of municipalities across the country. Voting is compulsory for Brazilians between 18 and 70 years old.

Bolsonaro, who is currently not affiliated with any political party, had said he would not get involved in the election campaign, but in recent weeks he turned to social media to promote a dozen candidates for mayor as well as councilor candidates.

The performance of candidates endorsed by Bolsonaro could be a measure of the popularity of the president, who appears likely to run for re-election, according to analysts. Bolsonaro was elected in 2018.

Bruno Carazza, a professor of economic law at Brazil’s Ibmec business school, said Bolsonaro had not made a concerted effort to rally supporters in the municipal elections and had lost an opportunity to “prepare the ground for the 2022 elections.″