Updated at 7:40 p.m.

A grand jury has indicted Texas Gov. Rick Perry (R) on allegations he abused his power when he vetoed funding to a state agency.

The governor has insisted that he's done nothing wrong, and expects to be exonerated.

The indictment delivers a curve ball to Perry's political prospects at a crucial juncture in his career: It comes as he weighs another bid for president in 2016.

The governor, who has been traveling to early nominating states, and has made no secret of his ambitions. He was recently in Iowa, where he enthusiastically mixed with conservative activists.

According to the Associated Press, the indictment centers on Perry's decision to veto $7.5 million in funding for the state's public integrity unit. He threatened to withhold the funding unless Travis County district attorney Rosemary Lehmberg agreed to resign following her arrest for driving drunk in 2013.

The state public integrity unit operates under the umbrella of the Travis County district attorney’s office.

In a statement, Perry attorney Mary Anne Wiley insisted that Perry did not break any laws.

“The veto in question was made in accordance with the veto authority afforded to every governor under the Texas Constitution," she said. "We will continue to aggressively defend the governor's lawful and constitutional action, and believe we will ultimately prevail."

Perry is the longest-serving governor in Texas history. He is stepping down at the end of his term after 14 years in office.