SAO BERNARDO DO CAMPO, Brazil (Reuters) - Former Brazilian President Luiz Inacio Lula da Silva turned himself in to police on Saturday, ending a day-long standoff to begin serving a 12-year prison sentence for corruption that derails his bid to return to power.

Slideshow ( 17 images )

Lula was flown by police to the southern city of Curitiba, where he was tried and convicted late last year, and taken to the federal police headquarters there to serve his sentence. Protesters supporting Lula clashed with police outside the walls of the building. Officers used stun grenades, tear gas and rubber bullets to disperse the crowd.

In a fiery speech hours earlier to a crowd of supporters of his Workers Party outside the union building in Sao Paulo, Brazil’s first working class president insisted on his innocence and called his bribery conviction a political crime, but said he would turn himself in.

“I will comply with the order,” he told the cheering crowd. “I’m not above the law. If I didn’t believe in the law, I wouldn’t have started a political party. I would have started a revolution.”

Lula, who faces six more trials on corruption charges, finally ended the standoff when he moved out in a convoy of black police SUVs after pushing his way out of the steel workers union headquarters where he had taken refuge. He entered police custody more than 24 hours after a court deadline on Friday afternoon.

Lula’s imprisonment removes Brazil’s most influential political figure and front-runner from this year’s presidential campaign, throwing the race wide open and strengthening the odds of a more centrist candidate prevailing, according to analysts and political foes.

It also marks the end of an era for Brazil’s left, which was out in force in the streets outside of the union headquarters in the industrial suburb of Sao Paulo where Lula’s political career began four decades ago as a union organizer.

The throngs of supporters, which began gathering when he arrived late on Thursday night, dissuaded police from trying to take him into custody and heightened concerns about a violent showdown.

Supporters blocked Lula’s first attempt to leave the union building on Saturday afternoon, pushing back against fellow party members trying to open the gate for his car to leave. Workers Party chief Gleisi Hoffmann pleaded with supporters to let him exit.

Lula was convicted of taking bribes, including renovation of a three-story seaside apartment that he denies ever owning, from an engineering firm in return for help landing public contracts.

“I’m the only person being prosecuted over an apartment that isn’t mine,” insisted Lula, standing on a sound truck alongside his impeached handpicked successor Dilma Rousseff and leaders of other left-wing parties.

A Brazilian Supreme Court justice on Saturday rejected the latest plea by Lula’s legal team, which argued they had not exhausted procedural appeals when a judge issued the order to turn himself in.

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.

The union where Lula, 72, sought refuge was the launch pad for his career in the late 1970s leading nationwide strikes that helped to end Brazil’s 1964-85 military dictatorship.

Lula’s everyman style and unvarnished speeches electrified masses 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.

“Those who condemn me without proof know that I am innocent and I governed honestly,” Lula said in a video message to his supporters. “Those who persecute me can do what they want to me, but they will never imprison our dreams.”