Brazil’s ex-President Luis Inácio Lula da Silva has missed a deadline to hand himself in to start his 12-year prison term for corruption.
Lula refused to surrender at police HQ in southern Brazil but his lawyers are negotiating with police.
Media reports suggest he will not resist arrest. Hundreds of supporters have gathered outside the building where he is staying near São Paulo.
Lula says his conviction is politically motivated.
It was designed to stop him from running for president in October’s poll, he claims, which he had been favourite to win.
Minutes before the deadline, his lawyers lost a bid to keep him out of jail while he appeals against his conviction.
In his order on Thursday, federal judge Sergio Moro said the 72-year-old had to present himself before 17:00 local time (20:00 GMT) on Friday at the federal police headquarters in the southern city of Curitiba.
But as the deadline for his surrender passed, hundreds of supporters rallied outside the metalworkers’ union near São Paulo, where he is staying. Some seem prepared to try to prevent his arrest.
“I think that if the federal police come here now to arrest Lula, they won’t have room [to get in],” Lula supporter Joao Xavier told Reuters.
One of Lula’s lawyers, Valeska Teixeira Zanin Martins, explained to the BBC why they were going to such lengths to keep him out of jail.
“It’s an arbitrary decision, it’s an illegal decision, it goes against the constitution, it goes against his basic human rights, it goes against his dignity, and we are going to fight all the way until, of course, we have available recourses and legal appeals so that he will not go to jail,” she said.
Lula has been sentenced to 12 years in jail but the appeals process could take several more months or even years.
The charges against him came from an anti-corruption investigation known as Operation Car Wash, which has implicated top politicians from several parties.
At the scene
By the BBC’s Katy Watson, Sao Bernardo do Campo
These past 24 hours have captivated Brazil. Helicopters have been circling the metalworkers’ union building where Lula is with his supporters, broadcasting every move for viewers across the country.
As the day went on the crowds got bigger. People here were hoping for an appearance of the man they say was the best president Brazil has had. But so far they’ve been disappointed – a few appearances from the window but nothing more.
Meanwhile on social media, his opponents have been celebrating the former president’s fate. A corrupt politician they say belongs behind bars.
So time has run out – what next? Will he negotiate with police or will he stand firm? There are plenty of rumours but nobody knows for sure. These are unchartered waters for Brazil. It’s a country known for its soap opera politics and this is one of its most dramatic chapters so far.
Who is Lula?
Lula served as president between 2003 and 2011. Despite a lead in opinion polls ahead of October’s election, he remains a divisive figure.
A former metalworker and trade union activist, he was the first left-wing leader to make it to the Brazilian presidency in nearly half a century.
While he was in office, Brazil experienced its longest period of economic growth in three decades, allowing his administration to spend lavishly on social programmes.
Tens of millions of people were lifted out of poverty thanks to the initiatives taken by his government and he left office after two consecutive terms (the maximum allowed in Brazil) with record popularity ratings.
What is Operation Car Wash?
In 2014, after Lula left office, prosecutors started investigating allegations that executives at the state oil company Petrobras had accepted bribes in return for awarding contracts to construction firms.
The investigation, dubbed Operation Car Wash, uncovered a huge web of corruption involving top-level politicians from a broad spectrum of parties taking kickbacks.
Lula himself was convicted of receiving a renovated beachfront apartment worth some 3.7m reais ($1.1m, £790,000), as a bribe by engineering firm OAS.
The defence says Lula’s ownership of the apartment has never been proven and that his conviction rests largely on the word of the former chairman of OAS, himself convicted of corruption.
Lula has described the battle against his conviction and prison term as a continuation of his fight against Brazil’s military rule, which came to an end in 1985.
“I did not accept the military dictatorship and I will not accept this dictatorship of the prosecutors,” he told a gathering of supporters on Monday.
What happens next?
Although he has been told to turn himself in, it is not certain that he will go to jail for 12 years.
He has not exhausted his appeals yet. There are two higher courts which he can still turn to, the Superior Court and the Supreme Court. The latter has only ruled so far on whether he should go to jail pending further appeals, rather than on the underlying case.
Neither of those courts would re-examine whether Lula was guilty of corruption. They would look into whether legal procedures were followed correctly and whether his constitutional rights were breached.
This process could take months or even years. If either court were to rule in Lula’s favour, his conviction could be annulled and he would be released.
What about the election?
Under the “clean slate law” passed in 2010, no one convicted of a crime upheld on appeal can run for elected office for at least eight years.
That law would rule Lula out from running for the presidency in October. However, exceptions have been made to the law before.
The decision as to whether Lula can stand for president will rest with the Superior Electoral Court (TSE).
The TSE will not make a decision on whether Lula can run or not until he has registered as a candidate and he has until 15 August to do so. So we may not know for months to come whether he will be able to stand.