Texas Gov. Rick PerryJames (Rick) Richard PerryTexas Democratic megadonor dies at 46 Nuclear and coal are essential for reliable energy The Hill's 12:30 Report MORE (R) was booked at a courthouse in Austin, Texas, on Tuesday, getting his fingerprints taken and a mug shot, following his indictment by a grand jury on abuse of power charges.

"I'm here today because I believe in the rule of law, and I'm here today because I did the right thing," a defiant Perry said to mostly cheers from those gathered outside the Travis County Courthouse.

Perry was indicted by a grand jury in Austin Friday for coercion of a public official and abuse of official capacity, both felony counts. 

Critics say Perry used his veto power as governor last year to try to force the resignation of District Attorney Rosemary Lehmberg, a Democrat, after she pleaded guilty to driving under the influence.

The governor had threatened to veto funding for her agency, unless she stepped down. Perry said she had lost the public’s trust. But Democrats accused him of trying to force her out to replace her with a Republican.

Perry on Tuesday said if he faced the decision to veto funding for the county district attorney's public corruption prosecutors, he would do it again. 

"I'm going to fight this injustice with every fiber of my being, and we will prevail," he said before entering the courthouse.

His federal PAC on Tuesday hit back at the indictment, releasing an ad ahead of Perry's booking that showed unflattering footage of Lehmberg's arrest and detention. 

Perry, who is weighing a 2016 presidential run, on Saturday called the indictment "an abuse of power" and said Monday that he would "fight with everything I have" against the indictment.

Many on the right, in particular many of his possible 2016 opponents, have rallied to Perry's defense. And many on the left have also questioned the charges.

The DNC, though, said they looked forward to Perry's trial.

"This may be a sideshow to Rick Perry but no amount of spin can cover up two felony charges," Democratic National Committee spokesman Michael Czin said after the news of the governor's booking.

"When Rick Perry has his day in court, his case will be decided by the facts, not theatrics," Czin added. "We look forward to the evidence being presented in court that convinced a jury of the Governor’s peers to indict."

Read Perry's indictment here.