(Adds negotiations with police, Saturday morning mass, latest appeal)
By Gram Slattery and Tatiana Ramil
SAO BERNARDO DO CAMPO, Brazil, April 6 (Reuters) - Brazil's former President Luiz Inacio Lula da Silva defied a judge's order to turn himself in to police on Friday and start serving a 12-year prison sentence for bribery that would likely end his hopes of regaining the presidency.
Lula remained holed up inside the headquarters of a steelworkers union in metropolitan Sao Paulo, surrounded by hundreds of fervent supporters, creating a standoff expected to stretch into the weekend.
Talks between Lula's aides and federal police to arrange his surrender were ongoing on Friday evening, according to two people familiar with the matter. One of the sources, who requested anonymity, said he would not be taken into custody before Saturday.
Workers Party leader Gleisi Hoffmann said Lula would take part in a Saturday morning mass at the union headquarters to commemorate the birthday of his late wife Marisa. Hoffmann denied reports that he was negotiating his surrender.
Federal police in Sao Paulo declined to say if they would attempt to forcibly take the former president into custody, a move that could trigger intense clashes with his supporters.
Lula's legal team filed a late Friday petition with the Supreme Court to quash the prison order, after losing a last-minute plea to an appeals court. The lawyers argued they had not exhausted procedural appeals and painted the case as an effort to remove Lula from the presidential race he is leading.
Hundreds of supporters, including workers, students and land rights activists, filled the street outside the union headquarters, cheering defiant speeches calling the case a political witch hunt. A banner hung from the building showed Lula's smiling face on an electronic voting machine.
"We are here to show that the workers will resist this attack against democracy," said union leader Jorge Nazareno.
Lula himself had not addressed the crowd nearly 24 hours after arriving at the building, but briefly appeared at a window to wave.
The same steelworkers union in Sao Paulo's industrial suburbs where 72-year-old Lula sought refuge served as the launch pad for his political career nearly four decades ago, when he led nationwide strikes that helped to end Brazil's 1964-85 military government.
Lula's everyman style and unvarnished speeches electrified masses long governed by the elite and eventually won him two terms as president, from 2003 to 2011, when he oversaw robust economic growth and falling inequality amid a commodities boom.
He left office with sky-high approval of 83 percent and was called "the most popular politician on Earth" by former U.S. President Barack Obama.
Lula's downfall has been as stunning as the unprecedented corruption probes that have convulsed Brazil for the last four years, jailing dozens of politicians and business leaders long considered above the law.
Federal Judge Sergio Moro, who has handled the bulk of cases in Brazil's biggest-ever graft investigation and issued Lula's prison order, wrote that he should not be handcuffed and would have a special cell in Curitiba, where he stood trial.
Lula was convicted last year for taking bribes from an engineering firm in return for help landing contracts with state-run oil company Petroleo Brasileiro SA.
Brazil's Supreme Court on Thursday rejected Lula's plea to remain free until he exhausts all his appeals, clearing the way for his imprisonment.
The ruling likely ends his political career and blows October's election wide open, leaving Brazil's left without an obvious candidate to regain power following the unpopular current president, Michel Temer.
Under Brazilian electoral law, a candidate is forbidden from running for office for eight years after being found guilty of a crime. Rare exceptions have been made in the past, and the final decision would be made by the top electoral court if and when Lula officially files to be a candidate.
With Lula out the race, the chances would increase of a market-friendly candidate winning the election, according to analysts and political foes.
But Cassio Goncalves, a labor safety specialist at the union headquarters, said he and fellow members of the Workers Party had not considered alternatives in the presidential race.
"We have no other plan," he said. "Plan A, B and C is Lula, because he is innocent. He will be our president." (Reporting by Gram Slattery and Tatiana Ramil in Sao Bernardo do Campo Additional reporting by Ricardo Brito and Lisandra Paraguassu in Brasilia, Eduardo Simoes in Sao Paulo Writing and additional reporting by Brad Brooks Editing by Brad Haynes, David Gregorio, Rosalba O'Brien and Tom Brown)