AUSTIN, Texas (AP) — A grand jury indicted Texas Gov. Rick Perry on Friday for allegedly abusing the powers of his office by carrying out a threat to veto funding for state prosecutors investigating public corruption — making the possible 2016 presidential hopeful his state's first indicted governor in nearly a century.

A special prosecutor spent months calling witnesses and presenting evidence that Perry broke the law when he promised publicly to nix $7.5 million over two years for the public integrity unit run by the office of Travis County Democratic District Attorney Rosemary Lehmberg. Lehmberg was convicted of drunken driving, but refused Perry's calls to resign.

"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."

The unit Lehmberg oversees is the same that led the investigation against former U.S. House Majority Leader Tom DeLay, a Texas Republican who in 2010 was convicted of money laundering and conspiracy to commit money laundering for taking part in a scheme to influence elections in his home state.

Several top aides to the Republican governor appeared before grand jurors in Austin, including his deputy chief of staff, legislative director and general counsel. Perry himself did not testify, though.

Perry was indicted on charges of abuse of official capacity, a first-degree felony with potential punishments of five to 99 years in prison, and coercion of a public servant, a third-degree felony that carries a punishment of two to 10 years.

No one disputes that Perry is allowed to veto measures approved by the Legislature, including part or all of the state budget. But the left-leaning Texans for Public Justice government watchdog group filed an ethics complaint accusing the governor of coercion because he threatened to use his veto before actually doing so in an attempt to pressure Lehmberg to quit.

"We're pleased that the grand jury determined that the governor's bullying crossed the line into illegal behavior," said Craig McDonald, executive director of Texans for Public Justice. "The complaint had merit, serious laws were potentially broken."

Michael McCrum, the San Antonio-based special prosecutor said he "took into account the fact that we're talking about a governor of a state — and a governor of the state of Texas, which we all love."

"Obviously that carries a lot of importance," McCrum said. "But when it gets down to it, the law is the law."

In office since 2000 and already the longest-serving governor in Texas history, Perry isn't seeking re-election in November. But the criminal investigation could mar his political prospects as he mulls another run at the White House, after his 2012 presidential bid flamed out.

McCrum said he'll meet with Perry's attorney Monday to discuss when he will come to the courthouse to be arraigned. McCrum said he doesn't know when Perry will be booked.

The public integrity unit investigates statewide allegations of corruption and political wrongdoing. Perry said he wouldn't allow Texas to fund the unit while Lehmberg remained in charge.

Perry said Lehmberg, who is based in Austin, should resign after she was arrested and pleaded guilty to drunken driving in April 2013. A video recording made at the jail showed Lehmberg shouting at staffers to call the sheriff, kicking the door of her cell and sticking her tongue out.

Lehmberg faced pressure from other high-profile Republicans in addition to Perry to give up her post. Her blood-alcohol level was nearly three times the legal limit for driving.

Lehmberg served about half of her 45-day jail sentence but stayed in office, despite Perry's assertions that her behavior was inappropriate.

The jail video led to an investigation of Lehmberg by a separate grand jury, which decided she should not be removed for official misconduct.

The indictment is the first of its kind since 1917, when James "Pa" Ferguson was indicted on charges stemming from his veto of state funding to the University of Texas in an effort to unseat faculty and staff members he objected to. Ferguson was eventually impeached, then resigned before being convicted, allowing his wife, Miriam "Ma" Ferguson, to take over the governorship.