Former Brazilian President Luiz Inacio Lula da Silva was taken into police custody on Saturday after a tense showdown with his own supporters, capping an intense three days that underscored raw emotions over the incarceration of a once wildly popular leader who has been engulfed by corruption allegations.

Just hours earlier, da Silva told thousands of supporters that he would turn himself in to police, but also maintained his innocence and argued his corruption conviction was simply a way for enemies to make sure he doesn't run - and possibly win - re-election in October.

When he first tried to leave the metal workers union headquarters to turn himself in, dozens of supporters blocked a gate where a car carrying da Silva was trying to exit.

"Surround, surround (the building) and don't let them arrest him," chanted supporters. After a few minutes of tense words between guards and supporters, the former president got out of the car and entered the union headquarters.

Police vehicles surrounded the building, raising the fears of clashes. Da Silva emerged a second time shortly after nightfall, this time surrounded by bodyguards who pushed back scores of supporters who tried to stop his advance.