It was testimony the whole country waited for — but former special counsel Robert Mueller could barely be heard at times on Wednesday, stammering through certain responses while asking lawmakers to repeat themselves.

The former FBI director, 74, oscillated between steadfastness and mumbling, his microphone at points failing him as he struggled to be heard above the din of spectators and photographers.

Twitter pundits and Republicans seized on the performance before the House Judiciary Committee on Capitol Hill — accusing him of being lost, confused and having no knowledge of his own investigation into whether President Trump colluded with the Russians during the 2016 election.

“I was surprised that Mr. Mueller was so disorientated,” Republican Arizona Rep. Debbie Lesko told The Post after the initial three-hour testimony wrapped up.

“He was unable to answer some basic questions, which really surprised me,” she said.

“He also seemed to contradict previous statements he had made and some of the things in his report, so that was surprising to me, I wasn’t expecting it.”

Republican North Carolina Rep. Mark Meadows also accused Mueller of “struggling to answer even basic questions.”

“He can’t accurately remember facts, evidence, or even his own conclusion,” Meadows wrote on Twitter, calling the investigation “a weapon to target a president they hated.”

At the outset of the hearing, Mueller faltered when asked if he was unable to conclude that Trump did not commit obstruction of justice.

Even in the room, the former FBI director was difficult to make out. He sat a foot from the table, often crossing his hands over his lap, and the microphone did not stretch all the way to his mouth.

He also didn’t lean in to talk directly into the microphone — even after House Judiciary Chairman Jerry Nadler asked that he do so.

But lawmakers didn’t help by peppering him with questions — often speaking over Mueller as the sound of camera shutters drowned out his testimony.

The chaotic nature of the hearing also added to the confusion.

Every few minutes, a new group of video camera operators and photographers would be led in to take a turn capturing images of him.

At points, Mueller didn’t know where questions were coming from and aides had to point to the correct committee member, prompting political reporters to speculate it made him “look lost.”

Republican Georgia Rep. Doug Collins, the committee’s ranking member, said he’d talk more slowly than his usual high-octane speed. He didn’t.

During a five-minute break, staff tried adjusting the microphone to make the sound quality better and for a time it worked.

But as the hearing closed in on the three-hour mark, Mueller’s testimony again sounded mumbled.

“I found Director Mueller intellectually disheveled, frequently confused and highly evasive on basic questions on the actions of Russians and their comingling of interests with people associated with Democrats and the anti-Trump movement,” Rep. Matt Gaetz (R-Florida), a staunch Trump supporter, told The Post afterward.

Outside, a crowd chattered in the hall and that noise entered the hearing room every time the large wooden doors opened. Lawmakers were chattering among themselves and with staff throughout the hearing as well.

On social media, some made light of the adversarial nature of Mueller’s testimony, in which he angered committee members by refusing to answer basic questions about the origins of the investigation.