WASHINGTON  Akio Toyoda, the president of Toyota, was billed as the main attraction at a House hearing Wednesday into the company’s recalls of millions of cars  recalls for which he profusely apologized and took personal responsibility.

But the transportation secretary, Raymond LaHood, offered more surprises in testimony that was sometimes heated, including many occasions when he was unable or declined to answer detailed questions about his department’s dealings with the auto company.

Both men spent hours before the House Committee on Oversight and Government Reform, one of three Congressional panels investigating the recall of more than six million vehicles and the delay in responding to problems of sudden acceleration.

Image Ray LaHood, the transportation secretary, was testy as he answered questions about oversight of Toyota before a House committee on Wednesday. Credit... Mary F. Calvert for The New York Times

Mr. Toyoda, with a translator to his right and the company’s chief operating officer for North America, Yoshimi Inaba, on his left, spoke in a calm, detached manner.