Andy Pettitte isn’t sure of his memory from past conversations with Roger Clemens. (Manuel Balce Ceneta/AP)

For a day and a half, Andy Pettitte had been the perfect prosecution witness — he said everything the government expected of him, often answering questions with single-word responses.

He even seemed believably pained while providing incriminating testimony against his former teammate, friend and baseball legend Roger Clemens, who is being tried on charges of lying to Congress in 2008 when he claimed never to have taken performance-enhancing drugs.

Then, in a moment worthy of Perry Mason, Pettitte took it all back Wednesday. After some gentle prodding by an experienced defense attorney, Pettitte admitted he was no longer sure that Clemens had confided in him years ago that he had taken taken human growth hormone (HGH), a performance-enhancing substance later banned by Major League Baseball.

A day earlier, he had emphatically told jurors that very thing.

“As you sit here today, you believe in your heart and mind that you very well might have misunderstood Mr. Clemens in 1999 or 2000?” asked one of Clemens’s defense lawyers, Michael Attanasio.

“Could have,” Pettitte said.

“It’s 50-50 that you might have heard it, might have misunderstood it?”

“That’s fair,” Pettitte replied.

Pettitte’s testimony was yet another dramatic moment in the lengthy prosecution of Clemens on federal charges of perjury, obstruction of Congress and making false statements. Prosecutors allege that Clemens lied when he denied having taken steroids or HGH to Congressional investigators and a House panel in 2008.

The baseball superstar’s first trial ended last year when U.S. District Judge Reggie B. Waltondeclared a mistrial after just two days of testimony because prosecutors with the District’s U.S. Attorney’s Office presented barred evidence to jurors.

The retrial started in April, and Pettitte was just the second witness called to the stand by prosecutors.

Legal experts said Pettitte’s fuzzy memory might hurt prosecutors.

“This case is all about somebody’s recollection, and now you have the government’s star witness telling jurors his recollection could be wrong,” said Steven Levin, a defense attorney and former federal prosecutor.

Prosecutors sought to rehabilitate Pettitte’s testimony by having him verify the accuracy of a chart depicting his earlier statements, but their efforts might not have gone far enough. Defense attorneys asked the judge to strike the HGH conversation from evidence, and Walton seemed inclined to do so.

“He is conflicted,” Walton said of Pettitte, before ordering both sides to submit legal briefings on the issue. “He doesn’t know what Mr. Clemens said.”

Pettitte, a 39-year-old Texan who speaks in a drawl and is a baseball star in his own right, is considered an important witness because he has nothing to gain in testifying against his friend and mentor and has generally not wavered in what he told Congressional investigators in 2008.

At that time, Pettitte said “The Rocket” had confided to him during a workout at Clemens’s home gym in 1999 or 2000 that he had taken HGH. Pettitte even submitted an affidavit to that effect.

On the witness stand in the District’s federal court on Tuesday, Pettitte recounted the accusation, testifying that “Roger had mentioned to me that he had taken HGH and that it could help with recovery” from injuries and workouts.

Pettitte, who retired from baseball in 2010 and is making a comeback this season, would later take HGH himself — on two occasions in 2002 and 2004 — and testified he deeply regretted the decision. Besides linking Clemens to steroid use, Pettitte’s testimony was considered important because it corroborated accusations made by Brian McNamee, a strength coach whose credibility is already being assailed by defense lawyers.

McNamee has said he injected Clemens with HGH and steroids at various times between 1998 and 2001 — allegations that were included in a 2007 report by former senator George Mitchell about steroids in baseball. McNamee testified before Congress about giving Clemens injections of those substances.

It is not clear when prosecutors will call McNamee. The U.S. Attorney’s Office has declined to divulge in advance who they will call to testify.

On cross-examination, Pettitte reiterated testimony he gave on Tuesday that in 2005 he approached Clemens in the kitchen of a training facility for the Houston Astros. (They played together on the New York Yankees and, later, the Astros.) At the time, the issue of steroids in baseball was generating intense interest in the media and in Congress, and Pettitte testified he was worried about how he would answer questions about his own use of HGH.

He then asked Clemens what he would say. Clemens denied having taken HGH and said he had earlier told Pettitte that it was his wife, Debbie, who had been injected with the drug, Pettitte testified.

When pressed by a defense lawyer, Pettitte admitted that he walked away from that conversation thinking he must have misunderstood what Clemens had said about HGH during their workout six years earlier.

The pitcher told Congressional investigators the same thing in 2008, saying that “Roger told me that he didn’t take it, and I misunderstood him. I took it for that, that I misunderstood him” in 1999 or 2000.

Attanasio then asked Pettitte about his current recollection of the HGH conversation, and the pitcher agreed with the defense attorney that there was only a “50-50” chance he had correctly recalled it.

The trial, which is expected to last several more weeks, is scheduled to continue Thursday morning with testimony from a federal agent who took the stand late Wednesday.