Story highlights Texas governor defiant as he arrives at courthouse to be booked on felony charges

He was indicted over his handling of a political controversy involving a local prosecutor

Perry and his lawyers call the charges outrageous and vow to fight them in court

Perry said he wouldn't change anything if confronted with the same situation

A defiant Texas Gov. Rick Perry, a potential 2016 presidential candidate, was booked on Tuesday on two felony charges related to his handling of a local political controversy.

Perry voluntarily appeared at the Travis County Court to be fingerprinted and to have his mug shot taken.

"I'm going to enter this courthouse with my head held high knowing that the actions I took were not only lawful and legal but right," Perry told reporters.

"I'm going to fight this injustice with every fiber of my being, and we will prevail and we'll prevail because we're standing for the rule of law," he said.

The charges allege Perry misused his office by improperly threatening to and then withholding state funds for a program run by a county prosecutor unless she resigned.

Photos: Moments from Rick Perry's career Photos: Moments from Rick Perry's career Former Texas Governor Rick Perry addresses the 42nd annual Conservative Political Action Conference (CPAC) February 27 in National Harbor, Maryland. Hide Caption 1 of 13 Photos: Moments from Rick Perry's career Former Texas Governor Rick Perry speaks to guests at the Iowa Freedom Summit on January 24 in Des Moines, Iowa. The summit is hosting a group of potential 2016 Republican presidential candidates to discuss core conservative principles ahead of the January 2016 Iowa Caucuses. Hide Caption 2 of 13 Photos: Moments from Rick Perry's career Former Texas Governor Rick Perry speaks during the victory party for Texas Attorney General and Republican gubernatorial candidate Greg Abbott after an apparent victory over Democratic Sen. Wendy Davis on November 4, 2014, in Austin, Texas. Hide Caption 3 of 13 Photos: Moments from Rick Perry's career Perry was booked on August 19, 2014, on two felony charges related to his handling of a local political controversy. He vowed to fight the charges. Hide Caption 4 of 13 Photos: Moments from Rick Perry's career Perry compares alcoholism to homosexuality at an event in San Francisco on June 11, 2014. "I may have the genetic coding that I'm inclined to be an alcoholic, but I have the desire not to do that - and I look at the homosexual issue the same way," he said. Hide Caption 5 of 13 Photos: Moments from Rick Perry's career Perry greets President Barack Obama as he arrives in Dallas on July 9, 2014, for a meeting with local elected officials and faith leaders about the humanitarian situation at the Southwest border. Hide Caption 6 of 13 Photos: Moments from Rick Perry's career Perry salutes after announcing on January 19, 2012, that he's suspending his presidential campaign just days before South Carolina's GOP primary. Perry finished sixth in the New Hampshire primary earlier that month. Hide Caption 7 of 13 Photos: Moments from Rick Perry's career Perry runs the Veterans Day parade route in Columbia, South Carolina, while local media and his security detail jog along to keep up on November 11, 2011. Hide Caption 8 of 13 Photos: Moments from Rick Perry's career At a GOP presidential debate on November 9, 2011, Perry fails to remember the third of three agencies he would cut if elected president. With self-deprecation he uttered "oops," a word that has since made him the butt of jokes, including his own. Hide Caption 9 of 13 Photos: Moments from Rick Perry's career Perry labels Social Security a "Ponzi scheme" at a GOP primary debate on September 7, 2011, in Simi Valley, California. "Anybody that's for the status quo with Social Security today is involved with a monstrous lie to our kids, and it's not right," he said. Hide Caption 10 of 13 Photos: Moments from Rick Perry's career In the inaugural stages of his 2012 presidential run, Perry mingles with a breakfast crowd during a campaign stop at Bazen's Family Restaurant in Florence, South Carolina, on August 19, 2011. Hide Caption 11 of 13 Photos: Moments from Rick Perry's career During a Florida primary debate, Perry defended a Texas program that allows students without legal documentation to take advantage of in-state tuition and argued those who disagree with him are heartless. Hide Caption 12 of 13 Photos: Moments from Rick Perry's career Perry, then the lieutenant governor of Texas, hugs George W. Bush before being sworn in as governor on December 21, 2000, in Austin. Bush had been elected president and was resigning as governor. Hide Caption 13 of 13

Gov. Rick Perry's mugshot

Perry, a Republican, was indicted last week on counts alleging coercion of a public servant and abuse of his official capacity.

His initial court appearance is scheduled for Friday.

The case centers on Perry's veto in June 2013 of $7.5 million approved by the Legislature to fund a public integrity unit run by Travis County District Attorney Rosemary Lehmberg, a Democrat. He wanted her out, following a drunk-driving arrest. She refused to leave.

His legal team insists he had a legal right to tie funding for the public integrity unit to Lehmberg's removal, and argues he had no legal obligation to explain his veto. Perry said on Tuesday that he would do the same thing again if faced with the same situation.

JUST WATCHED Attorney: Perry will fight indictment Replay More Videos ... MUST WATCH Attorney: Perry will fight indictment 02:46

JUST WATCHED Perry indictment: A 2016 roadblock? Replay More Videos ... MUST WATCH Perry indictment: A 2016 roadblock? 02:45

JUST WATCHED The case against Gov. Rick Perry Replay More Videos ... MUST WATCH The case against Gov. Rick Perry 01:15

Many Republicans and some Democrats have come to Perry's defense. Even Texas gubernatorial candidate Wendy Davis, a Democrat, wasn't as strident in her reaction as her party's state committee, which called on Perry to step down.

"Those are very serious charges and I as a lawyer understand and trust the justice system and I will rely on it to do its job," she said on Monday.

Perry is entering his final few months in office after a historic 14-year run in Austin, and it's unclear how the charges might impact any presidential run.

It's an open secret he's laying groundwork for a second White House campaign after his disastrous 2012 effort and is due to visit key states in coming weeks.