Brazil's Supreme Court on Friday dismissed a motion by former President Luiz Inacio Lula da Silva to be freed on bail or granted house arrest while he pursues further appeals of a corruption conviction.
The dismissal was announced by Justice Edson Fachin.
Lula's Workers Party had hoped to see him out of jail by next Tuesday so he could formally launch his campaign for the October presidential election.
The 72-year-old former head of state has been in custody since April 7, serving a 12-year sentence.
Despite the corruption conviction, the PT is still seeking to have Lula's name included on the October presidential ballot.
Lula, who governed Brazil from 2003 to 2011 and left office with sky-high approval ratings, would be the clear front-runner if he were allowed to run. But election authorities are not expected to allow his candidacy.
A three-judge appellate panel ruled in January that there was sufficient proof that Lula accepted a triplex in Guaruja, a resort town near Sao Paulo, from construction company OAS in exchange for helping that firm secure contracts with Brazilian state oil company Petrobras.
The case against Lula, who denies any wrongdoing, was based largely on plea-bargained testimony from people already convicted as part of the sprawling Petrobras investigation.