text: Lula's candidacy was denied by the Superior Electoral Court on 31 August 2018, as the majority of the seven-judge panel voted to bar Lula from running in the presidential race. On 11 September 2018, Lula officially dropped out of the election and was replaced by Fernando Haddad, whom Lula endorsed.
  Second presidency (2023–present)
  2022 election
  In May 2021, Lula said that he would run for a third term in the October 2022 general election, against the incumbent President Jair Bolsonaro. He was 17% ahead of Bolsonaro in a poll in January 2022. In April 2022, Lula announced that his running mate would be Geraldo Alckmin, a three-term governor of São Paulo state who had run against Lula in the 2006 presidential elections.
  On 2 October, in the first round vote, Lula was in first place with 48% of the electorate, qualifying for the second round with Bolsonaro, who received 43% of the votes. Lula was elected in the second round on 30 October with 50.89% of the vote, the smallest margin in the history of Brazil's presidential elections, three days after his 77th birthday. He became the first president of Brazil elected to three terms, the first since Getúlio Vargas to serve in non-consecutive terms, and the first to unseat an incumbent president. He was sworn in on 1 January 2023.  At age 77, he was the oldest Brazilian president at the time of inauguration.