Former Brazilian President Luiz Inácio Lula da Silva will be imprisoned while he appeals his corruption conviction, the country’s Supreme Court has ruled. He is facing 12 years in jail on charges of accepting a bribe but had asked to remain free during his appeal. Lula claims the charges are politically motivated, and designed to prevent him from running in October’s presidential election. Polls suggest he is the top candidate in the race. The Supreme Court judges ruled against him by six to five after a marathon session, which ended in the early hours of Thursday morning. The BBC’s Katy Watson said that Lula watched the ruling at the Metalworker’s Union, where his supporters held an upbeat concert. The 72-year-old former president is likely to remain free for a short time, until paperwork for his arrest is completed. His Workers Party said the ruling was a “tragic day for democracy and Brazil”. Lula served as president between 2003 and 2011. Despite his lead in current polls, he remains a divisive figure in Brazil. Up to 20,000 people protested in São Paulo on Tuesday calling for his immediate imprisonment, while supporters also rallied in large numbers in a rival demonstration. What was the ruling about? Until recently, defendants in Brazil were allowed to remain free until their final appeal had been exhausted. However, the Supreme Court was considering a 2016 ruling from a lower court, under which defendants could be sent to jail after a failed first appeal. Lula lost his first appeal in January, when the appeals court not only upheld his conviction, but increased the sentence from nine years to 12. The charges came from an anti-corruption investigation known as Operation Car Wash, which has implicated top politicians from several parties. Lula was found to have accepted a bribe worth some 3.7 million reais ($1.1m, £790,000) in the form of a beachfront apartment.