Former Virginia governor Robert F. McDonnell concluded his nearly 24 hours on the witness stand Tuesday by telling jurors he regretted taking lavish gifts from a wealthy businessman but firmly insisting he never promised favors in return.

“I, as governor, allowed my life to get out of balance,” McDonnell (R) testified, agreeing that he and his family accepted too many luxury goods from Jonnie R. Williams Sr., the former dietary supplement company executive. “That was my error.”

[Follow our liveblog for the latest]

The assertions on his fifth day of testifying were McDonnell’s final personal appeal to the seven men and five women who will decide whether he and his wife are guilty of public corruption. It capped a day in which McDonnell spent hours undergoing withering cross-examination about everything from his personal finances to the timing of items he accepted.

With McDonnell’s testimony complete, the federal case is spiraling rapidly toward a close. Defense attorneys estimated that they could rest as early as Wednesday, although prosecutors can still call rebuttal witnesses, and both sides must deliver closing arguments.

List of gifts given to the McDonnell family from Jonnie Williams.

Then jurors will decide.

McDonnell, along with his wife, Maureen, is charged with conspiring to lend the prestige of the governor’s office to Williams and his company, Star Scientific, in exchange for $177,000 in loans, vacations and luxury goods. The former governor stepped down from the witness stand with the broad outlines of his narrative mostly intact, albeit with several implausibilities and inconsistencies highlighted.

Prosecutors took their final shot at McDonnell on the stand Tuesday, wrapping up more than 81 / 2 hours of skeptical inquiries by using his own political rhetoric against him.

Assistant U.S. Attorney Michael Dry beamed the text of McDonnell’s 2010 inaugural speech onto large monitors in the courtroom, drawing jurors’ attention to a passage in which the governor cited Scripture as he proclaimed: “To whom much is given, much will be required.”

Dry then suggested — with a single question — that the Bible passage might reflect that the governor knew Williams’s generosity came with conditions.

“Mr. Williams gave you and your family approximately $177,000 in gifts and loans, didn’t he?” Dry asked.

“Yes,” McDonnell responded mildly.

McDonnell’s defense attorneys launched an immediate counterattack, with Henry “Hank” Asbill bolting from his seat to ask whether Williams’s largesse came with the expectation that McDonnell would repay it through official favors.

“Absolutely not,” McDonnell responded.

The exchange perhaps typified the day, as prosecutors used McDonnell’s previous testimony — and even his public appearances and statements — to try to poke holes in his narrative and McDonnell or his attorneys pushed back.

Prosecutors seemed to score a notable point when they showed jurors a clip of the governor appearing on Sean Hannity’s television show and talking about fiscal responsibility. The clip was played just after the former governor insisted — as he has throughout the trial — that he fully expected, and accepted, that a real estate company he owned with his sister would lose tens of thousands of dollars each year.

On the TV program, McDonnell bragged that he had cut his state spending “the same way you balance your checkbook at home.”

“You can’t spend more than you have for any period of time,” he said. “You go broke.”

Dry spent considerable time probing a series of e-mails and notes exchanged in February 2012 related to what ultimately became a $50,000 low-interest loan Williams gave to the company. The notes appear to suggest that deals even more favorable to the governor were in the works.

The timing of the loan discussions, too, is unflattering for the governor, and questions about the topic seemed to prompt some of the most heated exchanges of the day between McDonnell and Dry.

Five days after McDonnell had a detailed phone conversation with Williams about the loan, Maureen McDonnell sent her husband and a top aide an e-mail complaining that Williams was having trouble getting his phone calls returned about possible research at Virginia Commonwealth University and the University of Virginia. (Jurors know that Williams wanted the universities to perform studies on his product, Anatabloc, although the governor has disputed that the businessman asked for his assistance to get them off the ground.)

The next morning, Maureen McDonnell sent another e-mail to the aide, policy adviser Jasen Eige, this time indicating that her husband “wanted to get this going.” McDonnell insisted that he did not know his wife had sent the e-mail and that he never expressed any desire to see Williams’s product studied.

But Dry showed schedules and other documents demonstrating that the first lady sent that note while seated in an SUV next to her husband in Washington.

“Is it your testimony that your wife is misleading Mr. Eige?” Dry asked.

“I don’t know,” McDonnell said flatly.

A few days later, McDonnell e-mailed Williams to discuss money. Six minutes after that, he e-mailed Eige and asked the staffer to see him regarding “anatabloc issues at VCU and UVA.”

“This is one of five e-mails I sent that night,” McDonnell insisted.

“Right,” Dry said, his voice laced with sarcasm.

Dry pressed further: Didn’t McDonnell think that Eige would want to know about his financial dealings with Williams when he received the governor’s e-mail? Previous testimony established that the top aide knew nothing of them.

“To ask him to get a phone call returned, which I had done thousands of times? It’s basic constituent service,” McDonnell said. “No, sir.”

The assertion was a theme of McDonnell’s testimony: that what he did for Williams during the months of the gifts and loans — including helping the businessman get meetings with state officials and hosting an event for Williams’s company at the governor’s mansion — was not atypical. And at day’s end, to underscore that point, McDonnell’s defense attorney entered a 402-page document into evidence made up entirely of photographs of McDonnell appearing at ribbon cuttings and other business-related events with a company logo in view.

The governor, also, returned to an issue that has become central to his defense: his marriage, which he claims was so broken that it prevented him and his wife from conspiring together.

Prosecutors had tried to bat down the image of the McDonnells’ relationship as one in disarray, showing jurors evidence that the two had taken 18 trips together in roughly two years and photos demonstrating that just months ago, they arrived for hearings at the courthouse together hand in hand.

Of the vacations, McDonnell said that he and his wife had gone on just one by themselves and spent most of their time reading. Of the photos, he said they were taken at a time when he did not know the extent of his wife’s relationship with Williams. And he suggested that the charges they are accused of had brought them closer together.

“To be charged with 14 felonies, it was just a crushing experience for my wife and I,” he said. “We wanted to support each other.”

Carol Morello, Laura Vozzella and Arelis Hernández contributed to this report.