Outgoing Virginia Gov. Robert F. McDonnell (R) used his final State of the Commonwealth address to apologize for the scandal that has overshadowed his administration in the past few months.

[More: Full text of the governor’s speech ]

“I am not perfect, but I have always worked tirelessly to do my very best for Virginia. I’ve set exceptionally high standards for myself. But, as a flawed human being, I’ve sometimes fallen short of my own expectations,” he said, a reference to the ongoing federal investigation into his and his family’s acceptance of more than $160,000 in loans and gifts from a dietary supplement executive.

As he has before, McDonnell denied breaking any laws, but voiced his regrets to a hushed crowd of lawmakers.

“While choices I have made have been legal, and as several reviews have shown, no person or company received any special benefits during our administration, I understand there’s been adverse public impression some of my decisions have left or choices that I have made,” he said. “ I have prayed fervently that the collective good that we have done would not be obscured by this ordeal. So tonight, I say to all of you, and to all Virginians, that I am deeply sorry for the problems and pain I’ve caused for you during this past year.”

Still, he ended his nearly 5,000 word speech with the positive that dominated it, returning to what he describes as a very productive four years in which unemployment went down and a landmark transportation deal was passed.

In another serious moment, McDonnell also welcomed back to Richmond state Sen. R. Creigh Deeds (D-Bath), seven weeks after Deeds’s son stabbed him and then took his own life after mental health officials failed to find a psychiatric bed for him.

McDonnell defeated Deeds in the governor’s race that propelled him to office in 2009.

“Welcome back, Creigh. We love you,” McDonnell said, prompting a standing ovation and a turn of the cameras to Deeds, who stood at the back of the House chamber and could be seen mouthing “thank you” to the room.

Overall, McDonnell’s speech made the case that Virginia is far better off than it was four years ago, economically, environmentally, in transit and education. He even joked that he would be serving a second term, had lawmakers passed a bill undoing the state’s ban on consecutive terms. He urged the General Assembly to do what he would have done: increase education and mental health spending as his budget proposes, reform the tax code, and privatize the sale of liquor in the state.

The speech illustrates the complicated legacy McDonnell leaves behind. While he remains personally popular and well-liked by many legislators, he could soon face a federal indictment over the scandal.

Attorney General Ken Cuccinelli II, who distanced himself from the governor during his own gubernatorial campaign last fall, did not attend the speech. McDonnell’s wife Maureen, who may also face indictment, was present in the gallery. But he did not mention her in his remarks.