Luiz Inacio Lula da Silva, Brazil's former president, has been denied a habeas corpus request from the country's Supreme Court, a ruling that will almost certainly see him soon jailed on corruption charges.
The court ruled against the two-time president early on Thursday, after a marathon session. Six judges voted against Lula da Silva, and five others voted in his favour.
The Leftist leader had appealed against a January court ruling in a corruption case.
The former trade union leader, who left office with record high approval ratings, currently leads the polls for Brazil's elections in October by a wide margin. He says that the charges against him are politically motivated to keep him out of the race.
Unions and left-wing social movements gathered in the capital, Brasilia, in support of the ex-president, were separated by police from anti-Lula protesters who also took to Brazil's streets in 100 cities on Tuesday night.