Editor's note: This story has been updated throughout.

Gov. Rick Perry, taking aim at a powerful but embattled Travis County Democrat, used his line-item veto power Friday to eliminate millions of dollars in state funding for the prosecutors who investigate public corruption cases in the state capital.

Perry said he vetoed the funding because the investigative unit had “lost the public confidence.” He was referring to the recent DWI conviction — and unruly jailhouse behavior — of Democratic Travis County District Attorney Rosemary Lehmberg, whose office oversees the public integrity unit. Democrats accused Perry of trying to shut down state corruption investigations.

It was the most prominent and controversial veto of more than two dozen he issued Friday evening. Including two previous vetoes, Perry nixed from the regular 2013 session a total of 26 bills and several line-item appropriations from two state budget bills.

Among the other measures wiped out by his veto pen Friday: Senate Bill 17, a $10 million measure, backed by conservatives, that would have provided state training for armed classroom teachers; HB 950, the state Lilly Ledbetter Act, designed to prevent wage discrimination against women; and Senate Bill 219, which would have required Texas railroad commissioners, who oversee the oil and gas industry, to resign before running for another state office.

Perry also nixed House Bill 217, which restricts the sale of some sugary drinks for certain public school kids; House Bill 1160, which would have made it easier for towns with populations of no more than 2,500 and water rates at least 50 percent higher than some nearby cities to obtain the rights to run their water systems; and House Bill 2836, which had ordered a study of the state's curriculum standards and limits the number of benchmark exams school districts can administer locally.

The governor's veto of a higher education oversight bill, SB 15, was not entirely unexpected, but it generated plenty of heat Friday night. Legislators from both parties accused the University of Texas System Board of Regents of micromanaging the University of Texas at Austin and harassing its president, Bill Powers. The bill, which would have reined in regent power, included a provision that regents could not fire a university president without a recommendation from a chancellor.

But Perry, who appoints university regents, ensured that they kept all their power and authority.

“Limiting oversight authority of a board of regents,” Perry said, “is a step in the wrong direction. History has taught us that the lack of board oversight in both the corporate and university settings diminishes accountability and provides fertile ground for organizational malfeasance.”

The bill had been the subject of intense negotiations between supporters and Perry’s office. The original bill included a requirement that regents appointed during the interim could not vote on budget or personnel matters until the Senate Nominations Committee had considered them or 45 days had passed. After negotiations with the governor's office, the number of days was lowered to 20 and then the provision was eliminated entirely. But that concession was not enough to save the bill.

That veto and others provoked some bipartisan outrage.

The author of the UT board bill, state Sen. Kel Seliger, R-Amarillo, described the veto as a blow to the state’s public universities.

“Given the continued lack of transparency and persistent conflicts, this legislation clearly was necessary, due in no small part to some of Governor Perry's appointees,” Seliger said. “The decision to veto SB 15 ensures that the conflicts, controversies, and lack of transparency will continue. It harms the reputation of Texas' world class public universities and hinders their ability to attract the best students, faculty, and administrators to this great state. "

Sen. Dan Patrick, R-Houston, author of the gun training bill for school employees, also criticized the decision to veto his bill. He said the $10 million cost assigned to the legislation was inflated and grossly inaccurate. He also complained that no one had called his office to discuss a possible veto.

"What really infuriates me is his staff doesn't know how to read the legislation," Patrick said. "He got bad advice."

Democrats, meanwhile, were incensed about Perry's veto of the gender equality bill.

“Once again our governor has made women’s health and women’s rights a target in order to bolster his own political standing,” said Sen. Wendy Davis, D-Fort Worth, author of the bill and often mentioned as a potential 2014 gubernatorial candidate.

Perry has authority to nix both bills and individual spending items. According to calculations by the liberal Center for Public Policy Priorities, Perry vetoed a total of $29 million in general revenue spending.

He made several line-item vetoes in House Bill 1025, a key budget bill of the session. The targeted vetoes include a series of special funding items at higher education institutions including $2 million for the petroleum engineering program at Texas A&M International University and $1.5 million for the Department of Mexican-American Studies at the University of Texas at Austin, as well as smaller appropriations at the the University of North Texas, Prairie View A&M University and the University of Houston.

In a statement, Perry explained those vetoes as his effort to combat rising tuition, which he attributed in part to the rise in “non-formula funding” at higher education institutions to launch new academic programs that never go away.

“Institutions are rarely held accountable for these funds, which is why many of them stay in the budget, year after year, even after their purpose is no longer clear,” Perry wrote. "This is not the best use of hard-earned tax dollars.”

His veto of the funding for Travis County's public integrity unit is unprecedented and far-reaching.

It is aimed squarely at Lehmberg, who helped prosecute the criminal case against former Republican U.S. Majority Leader Tom DeLay. Lehmberg's career and reputation took a nosedive since she was convicted and jailed for drunk driving in April.

During a bill-signing ceremony at the Capitol earlier Friday, the governor pointed to the humiliating videotape of Lehmberg’s arrest and initial jailing. The video shows a clearly impaired Lehmberg acting belligerent and unruly. She cried, kicked the door of her jail cell and repeatedly demanded that deputies call Travis County Sheriff Greg Hamilton.

"Travis County is going to have to make a decision about whether or not they keep a district attorney who obviously has some real problems," Perry said. "People who have looked at the videos I think will come to the same conclusion as most folks, that that was pretty inappropriate activity.”

Perry's office had made it clear that he would yank state funding for the fraud-busting unit unless Lehmberg resigned, even though prosecutors said it would inflict major damage on their ability to ferret out government corruption in Austin. The head of the unit, Assistant District Attorney Gregg Cox, said the unit has 35 employees and is handling more than 400 cases.

“It’s an entire division of the district attorney’s office, three separate units and it’s significant blow to the office,” Cox said.

Democratic activists have questioned whether Perry was using his power to halt or cripple investigations into agencies that he helps oversee as governor — including the ongoing investigation of the troubled Cancer Prevention and Research Institute of Texas.

A liberal watchdog group, Texans for Public Justice, said Perry “likely” violated one of several laws that the group says prohibits public officials from using their office to coerce action from another. It filed a complaint, both with Lehmberg and County Attorney David Escamilla, also a Democrat.

TPJ director Craig McDonald said the line-item veto and Perry's nixing of the ethics sunset bill — the one that would have barred railroad commissioners from running for office without first resigning — was disappointing but not surprising.

"Perry sits atop what many believe is the most corrupt regime in recent Texas history. It's no surprise he wants to kill ethics reform and wipe out the state's public corruption watchdog," he said. "Perry's office is an ethical black hole. Ethics reform goes in. Nothing comes out."

Reeve Hamilton, Morgan Smith and Alana Rocha contributed to this report.