Virginia Gov. Bob McDonnell’s criminal defense attorneys had fought to keep the e-mails from prosecutors. (Alex Wong/Getty Images)

A federal appeals court on Wednesday rejected a request by attorneys for Virginia Gov. Robert F. McDonnell (R) to shield two e-mails written by a senior policy adviser to the governor from a grand jury subpoena in a criminal investigation.

The three-judge panel’s ruling does not name McDonnell, but two people familiar with the case confirmed that the opinion relates to the federal investigation into McDonnell’s relationship with a wealthy political supporter who gave the governor’s family gifts and money.

The ruling is a blow to the governor, the two people said, because it allows prosecutors to use e-mails they consider significant evidence as they investigate whether McDonnell improperly used his office to help a generous patron.

The robust fight over the e-mails, written by McDonnell counsel Jasen Eige, signals their importance in a potential case against the governor.

The ruling also provides a window into the behind-the-scenes legal wrangling in a case that so far has taken place in closed courtrooms, as McDonnell has fought prosecutors gathering evidence about his interactions with Jonnie R. Williams Sr., chief executive of a dietary supplement company. The appellate panel heard closed arguments Sept. 16 after McDonnell’s legal team appealed an adverse decision by a lower court.

Eige serves as chief counsel to the governor’s office, although under Virginia law, the governor formally receives legal advice from the state’s elected attorney general.

McDonnell’s criminal defense attorneys had fought to keep the e-mails from prosecutors, arguing that they were protected by attorney-client privilege because they were between the governor and a lawyer on his staff.

But the three-judge panel of the U.S. Court of Appeals for the 4th Circuit concluded that Eige’s communications with the governor didn’t meet the standard because Eige couldn’t show that he was acting as an attorney or providing a legal opinion to McDonnell.

In the eight-page ruling, the judges wrote that McDonnell’s team had “utterly failed” to establish that Eige was providing the governor with legal advice in the e-mails.

The “government-employed lawyer could not (or at least did not) testify that he was acting as a lawyer or providing an opinion of law or legal services . . . with respect to the emails,” they wrote. The ruling of the Richmond-based appeals court did not specify what was in the e-mails.

Eige declined to comment. Jason Miyares, a spokesman for McDonnell’s legal team, and U.S. Attorney Dana Boente also declined to comment.

Williams provided more than $150,000 in gifts and money — money that McDonnell has described as loans — in 2011 and 2012. The largess included $15,000 in catering for the wedding of one of McDonnell’s daughters and a $10,000 engagement gift for another, a $15,000 shopping trip for the first lady, a $6,500 Rolex intended for the governor, and $120,000 provided by Williams to McDonnell’s wife and a small business McDonnell owns with his sister.

The gifts came as McDonnell and his wife took steps to promote Williams’s company Star Scientific Inc.

McDonnell has apologized for his relationship with Williams and returned the money and “tangible” gifts. But he has repeatedly said he did not improperly assist the businessman.

If there are charges, they are unlikely to come before Virginians go to the polls next month to choose McDonnell’s successor, as prosecutors continue to review and weigh the evidence, people familiar with the case said.

They said prosecutors are particularly careful that their actions not affect the outcome of the election, and, for that reason, the ruling is unlikely to speed up or slow down the probe.

Still, people familiar with the case said the ruling marks a significant development, removing a legal hurdle for prosecutors.

The three appellate judges taking part in the decision were all named to the appellate bench by Democratic presidents. Dianna Gribbon Motz and Robert Bruce King were nominated by Bill Clinton; Stephanie Thacker was nominated by President Obama.

The appellate panel disagreed with the judge overseeing the grand jury case on one point, finding that U.S. District Judge John A. Gibney Jr. was overbroad in ruling that McDonnell could not seek to protect any of his communications with a staff lawyer in a criminal probe.

The panel vacated that part of the judge’s decision, finding that it was unnecessary to issue such a broad ruling on the matter, given that they had decided that prosecutors could have access to the only two contested e-mails.

The panel indicated that it is willing to revisit the issue if warranted as the grand jury investigation proceeds.

Matt Zapotosky contributed to this report.