SAO PAULO (Reuters) - Tens of thousands of protesters gathered in cities across Brazil on Wednesday to march against education spending freezes by the government of far-right President Jair Bolsonaro, who labeled the marchers "useful idiots and imbeciles."

Brazil's National Student Union called for nationwide protests against what it called spending cuts, after the Education Ministry said it was freezing nearly a quarter of non-obligatory spending due to the government's precarious fiscal situation.

The marches mark the first national protests against the administration of Bolsonaro, whose poll numbers are falling as he struggles with a weak economy, rising unemployment, an unruly coalition in Congress and infighting within his cabinet.

Speaking in Dallas, Texas where he traveled to attend a gala dinner, Bolsonaro denied his government had cut education budgets and cast the protests as a partisan spectacle.

"They are useful idiots, imbeciles, who are being used as the maneuvering mass of a clever little minority who make up the nucleus of many federal universities in Brazil," he said.

Demonstrators marched to Congress in the capital Brasilia and thronged a major thoroughfare in Sao Paulo in the afternoon. Official crowd estimates were not immediately available, and the protests were expected to gain steam over the course of the day.

"The importance is to show that civil society is organized against these cuts," said Rodrigo Tonieto, 22, in Sao Paulo. "Together, we are going to say 'no' to the Bolsonaro government ... To say 'no' to the mess that this government is."

(Reporting by Eduardo Simões and Pablo Garcia in Sao Paulo; Writing and additional reporting by Gabriel Stargardter in Rio de Janeiro; Editing by Brad Haynes and James Dalgleish)