Brazil's ex-President Luis Inácio Lula da Silva is holed up in a union building in his hometown, outside Sao Paulo, after missing a deadline to hand himself over to the authorities.

The 72-year-old had been ordered to hand himself in to start a 12-year prison term for corruption.

His lawyers are said to be negotiating his surrender with police.

Some reports suggest he may surrender on Saturday, others that he will hold out through the weekend.

Thousands of cheering supporters gathered outside the building in Sao Bernardo do Campo where Lula is staying.

"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.

Authorities have stressed that the left-wing figurehead is not being viewed as a fugitive, as everyone knows where he is.

Brazilian Senator Gleisi Hoffmann tweeted that a Catholic Mass would be said at the metalworkers' union building early on Saturday, in memory of Lula's late wife Marisa Leticia who died last year.

Why is Lula doing this?

Lula says his conviction is politically motivated.

He claims it was designed to stop him from running for president in October's poll, 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 Lula 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.

Brazilian Senator Gleisi Hoffmann tweeted that a Catholic Mass would be said at the metalworkers' union building early on Saturday, in memory of Lula's late wife Marisa Leticia who died last year.
Why is Lula doing this?

Lula says his conviction is politically motivated.

He claims it was designed to stop him from running for president in October's poll, 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 Lula 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.

Who is Lula?

Lula served as president from 2003-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 was he convicted of?

The charges against Lula came from an anti-corruption investigation known as Operation Car Wash, which has embroiled top politicians from several parties.

He was convicted of receiving a renovated beachfront apartment worth some 3.7m reais ($1.1m, £790,000), as a bribe from 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.

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 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.