A federal judge in Brazil has seized the passport of former president Luiz Inacio Lula da Silva and banned him from leaving the country.
Judge Ricardo Leite is investigating allegations that Lula illegally lobbied on behalf of a Swedish firm that sold military jets to Brazil.
On Wednesday, an appeals court unanimously upheld his conviction for corruption in a separate case.
The former president says he is the victim of political persecution.
The Brazilian Air Force (FAB) agreed in 2013 to pay Sweden’s Saab $4.5bn (£3.1bn) for 36 fighter jets.
Saab beat competition from US giant Boeing and France’s Dassault.
The negotiations were initiated during Lula’s term in office but were concluded by his successor Dilma Rousseff.
On Thursday his Workers Party announced officially that Lula would be its candidate in October’s presidential election, despite the appeals court ruling against him.
All three judges at the appeals court in the city of Porto Alegre said Lula had broken the law by accepting special favours over a seafront apartment from a construction company involved in a major corruption scheme.
They increased his original sentence from nine-and-a-half years to 12 years and one month in jail.
Even though the 72-year-old was sentenced in July 2017 and that conviction has now been upheld, he could remain out of prison for many months if he takes his appeal all the way to the Supreme Court.
Lula said that the judges had failed to produce any incriminating evidence against him.
“I haven’t committed any crime. This is a political fight and we will make a political decision,” he said at a party event in Sao Paulo.
The ex-leader, who governed from 2003 to 2011, has been leading most opinion polls.
He reaffirmed that he was determined to stand for office again.
The Brazilian economy has collapsed since Lula left power in 2011. Many resent the pro-business introduced since President Michel Temer took office nearly two years ago.
The elections are scheduled for 7 October, and under Brazilian electoral rules, candidates cannot run for office if they have convictions.
But Lula’s lawyers argue that the rule cannot come into force until the defendant has exhausted all of his appeals.
Even then, Lula could ask the Supreme Court to lift the ban and, if the court were to agree, he could stand for office.