Robert F. McDonnell faced hours of aggressive questioning at his corruption trial Monday as a federal prosecutor sought to expose contradictions and inconsistencies in the former Virginia governor’s account of his interactions with a wealthy Richmond businessman.

It was the fourth day that McDonnell occupied the witness stand in his own defense but the first in which the Republican former governor went head to head with his chief antagonist: Assistant U.S. Attorney Michael Dry, who has led the investigation of McDonnell and his wife, Maureen, for more than 16 months.

[Follow our Tuesday liveblog for the latest]

As Dry opened with a series of rapid-fire questions, McDonnell repeatedly acknowledged that he knew about — and in some cases personally benefited from — gifts and loans given to him and his family by dietary supplement executive Jonnie R. Williams Sr. in 2011 and 2012.

But at other times during the prosecutor’s more-than-41 / 2-hour barrage, McDonnell appeared unwilling to commit to simple yes-or-no answers, holding fast to the parsing that had served him well as a politician.

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

“That doesn’t answer the question!” U.S. District Judge James R. Spencer interrupted at one point as McDonnell began to provide a long and inconclusive response to a question about money troubles at a real estate company he owned. “Were there financial difficulties or not?”

McDonnell agreed that he knew Williams paid $15,000 for catering at his daughter’s wedding in 2011 and lent $50,000 to McDonnell’s wife that year.

The former governor said he accepted expensive golf outings and equipment and luxury vacations from the executive, driving the businessman’s Ferrari during one trip. He acknowledged personally negotiating $70,000 in loans from Williams for a real estate partnership he owned with his sister.

McDonnell is charged with conspiring with his wife to trade on the prestige of his office for all of those items and more. The government began its cross-examination of McDonnell — the first governor in Virginia history to be charged with a crime — on the 21st day of his trial. Prosecutors will continue questioning McDonnell on Tuesday.

Attorneys for the former first couple have argued that their marriage was in serious trouble during McDonnell’s time as governor and that their communication was far too broken for them to conspire to assist Williams.

McDonnell revealed an important new detail about his wife Monday, testifying for the first time that in 2012, while he was still in office, the first lady received mental-health counseling and medication. The answer came in response to a question from his wife’s attorney.

Dry took direct aim at the idea that the McDonnells were no longer communicating while Robert McDonnell was still governor. The prosecutor showed documents from the 22-month period when McDonnell has testified that his marriage was falling apart. The files showed the McDonnells took 18 trips together. They included vacations to a state-owned cottage at Camp Pendleton, to the Wintergreen resort and to the exclusive Homestead resort in western Virginia, and there were two trips to Florida.

And in an especially dramatic moment, Dry flashed three photographs of the McDonnells walking side by side — sometimes holding hands — into court for appearances since they were jointly indicted in January. The most recent was taken in May.

McDonnell has testified that he and his wife are living apart for the duration of the trial. Since it began, they enter court separately each day and do not interact during breaks in court proceedings.

During his nearly 18 hours on the witness stand, answering questions from lawyers for both sides, McDonnell has insisted that Williams never asked for anything in exchange for his financial assistance and that Williams received nothing beyond routine political courtesies.

But over lengthy questioning, Dry pointed out instances described by Williams in his testimony — and in some cases, supported by documents — in which the businessman actively sought to have his new dietary supplement studied at public universities in Virginia.

Williams has testified that he showered McDonnell and his family with luxuries and financial assistance because he believed the governor was lending credibility to his supplement company and would assist him in obtaining the studies.

Repeatedly, McDonnell said he did not recall those instances.

He said he had not closely read a letter from Williams on the letterhead of his company, Star Scientific, in which Williams wrote about his desire to launch studies. The letter was forwarded to McDonnell by his wife’s office in June 2011, the same month as their daughter’s wedding.

He said he recalled Williams discussing studies that were underway on the supplement Anatabloc at a private dinner the first couple hosted for the businessman and his wife at the governor’s mansion in 2011. But he couldn’t recall if Williams told him that his company hoped Virginia universities would conduct additional research.

“I don’t remember,” McDonnell testified.

He also said he could not remember whether he ever saw an e-mail written by a Star Scientific researcher who expressed a desire to test Anatabloc on state employees. Maureen McDonnell had responded by promising to print the e-mail and show it to her husband.

More broadly, McDonnell said he could not remember if his wife ever broached the idea of using state workers as test subjects for Anatabloc.

“Not that I recall,” McDonnell said.

“Is that something that you would recall?” Dry asked.

“Maybe,” McDonnell replied.

No matter what Williams wanted, the defense has stressed, Virginia universities did not conduct studies of the supplement, nor was it tested on state workers. And the former governor testified that many of Williams’s gifts came as a surprise to him.

McDonnell said he believed his wife when she told him in early June 2011 that she had not explicitly asked for money when Williams delivered a $50,000 loan the previous month. (That faith came even though, McDonnell testified Monday, his wife had a history of making “inappropriate requests” for money from friends and relatives.)

And he considered gifts from Williams that summer, including expensive golf clubs for his sons and a new Notre Dame golf bag for him, to have arrived “out of the blue.”

McDonnell testified that he had no memory of another item: A photograph in which he is shown holding up a bottle of Anatabloc and smiling. It was posted to the product’s Facebook page.

“I’ve had hundreds of pictures taken of me with products,” McDonnell said.

Throughout the questioning, McDonnell occasionally showed flashes of exasperation and frustration.

But he answered questions resolutely and confidently, occasionally sparring with Dry. He might have earned some sympathy with jurors when he complained about some confusing queries and declined to answer when Dry attempted to ask several questions at once.

But Dry pressed ahead, at various points trying to cast McDonnell and his family in a light the jury may find unflattering. He suggested the family was generally willing to accept — and perhaps even solicit — the generosity of wealthy people in their social and political networks for their personal benefit.

The prosecutor questioned the former governor particularly aggressively about a $23,000 island vacation he took in 2012 courtesy of Henrico hotelier William H. Goodwin Jr. — apparently skeptical of McDonnell’s claim that Goodwin footed the bill for the trip because he is a personal friend.

“How many children does Mr. Goodwin have?” Dry asked.

McDonnell paused. “I think he’s got three children,” he said. (Though Dry did not point it out, Goodwin has five children.)

“What are their names?” Dry pressed.

McDonnell paused again. “I don’t know the family,” he acknowledged. “I knew he and his wife, Alice.”

And at day’s end, Dry presented a last piece of evidence: e-mails showing the governor’s soon-to-be son-in-law telling a staffer about how to plan a golf trip for McDonnell.

The instructions include finding a course owner who “will let me and my family play for free, or at a reduced cost.”

“Also,” the note added, “finding out where to stay for free/at a reduced cost.”

Laura Vozzella and Rachel Weiner contributed to this report.