New documents released by Virginia Gov. Terry McAuliffe’s office show that taxpayer-funded attorneys were deeply involved in responding to the federal investigation of former governor Robert F. McDonnell, going back to at least early June.

McDonnell (R) and his wife, Maureen, were indicted last week, charged with working together to use the governor’s office to assist a Richmond area businessman in exchange for more than $165,000 in gifts and loans.

McDonnell also has a private legal defense team, which is paid by a fund established by his allies. He and his wife have said they are innocent and are fighting the charges.

The taxpayer-funded law firms were appointed to represent McDonnell in place of then-Attorney General Ken Cuccinelli II (R), who had conflicts in the matter.

They were to work for McDonnell’s office and his staff, at first as they responded to a state case involving the former chef at the governor’s mansion, who was accused of stealing food.

But the new documents suggest that the lawyers spent much of their time working for McDonnell as his office responded to requests from federal prosecutors investigating the governor’s relationship with the businessman as well as media requests for documents.

Federal authorities submitted subpoenas and conducted interviews with staff employees from June to November.

While in office, McDonnell had periodically released invoices submitted for the two law firms, showing that they charged more than $785,000 for their services through the end of the year. Citing attorney-client privilege, however, the McDonnell administration redacted the bills, making it difficult to determine what the lawyers were doing.

On Friday, responding to requests made by The Washington Post and the Richmond Times-Dispatch, the office of the new Democratic governor released 125 pages of detailed descriptions of the attorneys’ work contained in bills received since the November election. But they reflect at least some of the lawyers’ work going back seven months.

The bills show that Anthony Troy and his law firm, Eckert Seamans Cherin & Mellott, appointed to represent the governor’s office in May, were the primary contact in preparing government documents in response to subpoenas.

One lawyer wrote that he spent time on June 14 analyzing “federal statutes to ascertain potential charges against client.” That was a few days after The Post first reported that a grand jury had been empaneled in the matter but long before it was clear to the public that McDonnell could be in legal jeopardy.

In an interview, Troy said his office reviewed a million pages of documents in response to federal subpoenas, ultimately preparing 500,000 for prosecutors.

“We did a lot of work,” he said. “In looking at public documents, we had to determine whether they were or were not relevant to any potential charges that could be brought.”

Invoices show that Troy was involved with an effort to shield two e-mails between the governor and counselor and chief policy adviser Jasen Eige. The U.S. Court of Appeals for the 4th Circuit ruled that attorney-client privilege did not apply to the e-mails, and prosecutors quoted from the correspondence in the indictment against the McDonnells.

They also show that Troy’s office drafted a motion to quash one subpoena seeking e-mails exchanged between Secretary of Health and Human Services William A. Hazel Jr. and the governor and first lady. He said it was not filed because prosecutors narrowed their request without a court fight.

The documents show — and Troy confirmed — that assistant U.S. attorneys also held a standing request to receive any document requested by The Post, the Times-Dispatch and other media organizations under Virginia’s Freedom of Information Act.

They also shed light on a secret skirmish that unfolded between prosecutors and the governor’s office as federal authorities sought to interview the governor’s staff without Troy present.

“We went back and forth on that,” Troy said.

Ultimately, the dispute was resolved with the hiring of a second law firm, D.C.-based Baker & McKenzie, for McDonnell’s staff.

The new documents show that federal prosecutors sought to interview and subpoena a wide variety of staff to the governor, including Hazel, Secretary of Agriculture Todd Haymore and Secretary of the Commonwealth Janet Kelly.

Brian Whisler, a lawyer with Baker & McKenzie, did not respond to a request for comment. A spokesman for the U.S. Attorney’s Office declined to comment.