Brasília (AFP) - Brazilian President Jair Bolsonaro on Tuesday revoked an order that had loosened the country's gun controls, after it faced legal and political challenges.

The move comes a day before the Supreme Court was due to debate the constitutionality of the decree allowing millions of Brazilians to carry loaded weapons in public, which the Senate rejected last week.

Bolsonaro announced the decree in May, enabling a wide range of professions, including truckers, politicians, hunters and even some journalists, to carry weapons without having to prove why they needed them.

But it faced a strong opposition, even from governors in states with high rates of violence who argued the order failed to improve security.

Bolsonaro, a former army captain, has defended the decree as honoring the result of a 2005 referendum in which nearly 64 percent of Brazilians rejected a law that included, among other things, a total ban on the sale of firearms.

But experts have warned the loosening of restrictions would fuel gun violence in a country which already has one of the highest homicide rates in the world.