In early 2016, Lula was appointed Chief of Staff under Rousseff, but Justice Gilmar Mendes of the Supreme Federal Court blocked the appointment due to ongoing federal investigations at the time. In July 2017, Lula was convicted on charges of money laundering and corruption in a controversial trial, and sentenced to nine and a half years in prison. The federal judge of the case, Sergio Moro, later became Minister of Justice and Public Security in Bolsonaro's government. After an unsuccessful appeal, Lula was arrested in April 2018 and spent 580 days in jail. Lula attempted to run in the 2018 presidential election, but was disqualified under Brazil's "Clean Slate" Law. In November 2019, the Supreme Federal Court ruled that incarcerations with pending appeals were unlawful and Lula was released from prison as a result. In March 2021, The Supreme Court Justice Edson Fachin ruled that all Lula's convictions must be nullified because Lula was tried by a court that did not have proper jurisdiction over his case. Fachin's ruling, which still has to be confirmed by other Supreme Court Justices, restored Lula's political rights.