View Photo Gallery:The trial of Roger Clemens.

Federal prosecutors were dealt a serious blow in the perjury trial of baseball legend Roger Clemens on Wednesday when a key witness, Andy Pettitte, admitted that he might have misunderstood his close friend admit he took performance-enhancing drugs in 1999 or 2000.

Under cross-examination by defense lawyers, Pettitte agreed that there was a “fifty-fifty” chance that he midheard Clemens when he testified earlier that “The Rocket” had confided in him that he had taken the drug Human Growth Hormone.

On Tuesday, Pettitte testified that the two were working out in Clemens’ home gym when his friend “mentioned to me that he’d taken HGH and that it could help with recovery.”

Pettitte seemed confident in his answer and has not wavered over the years about what transpired in the gym. In 2008, he told the same story to Congressional investigators.

He threw doubt into the government’s case a day later. It started when defense attorney Michael Attanasio began asking Pettitte about a 2005 conversation that the star left-handed pitcher had with then-teammate Clemens at a training facility for the Houston Astros.

With steroids in the news, Pettitte testified that he was worried that he might be asked about having taken performance-enhancing drugs – he was injected with HGH in 2002 and 2004 – and asked Clemens what he would say if asked by reporters about having used it.

Clemens immediately denied having taken it. “What are you talking about,” Clemens said, according to Pettitte. Clemens then said it was his wife, Debbie, who had taken HGH. She was injected with the drug before a swimsuit photo shoot for a 2003 magazine.

Pettitte walked away from Clemens and didn’t speak about the subject again. But he admitted to Attanosio that at the time he thought he must have misunderstood what his friend originally told him back in 1999 or 2000.

“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?” Attanosio asked.

“Could have,” Pettitte replied.

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

“That’s fair,” Pettitte replied.

Pettitte, a 39-year-old who retired from baseball in 2010 and is now making a comeback, is considered a key witness because the government’s case relies heavily on the word of Brian McNamee, a former strength coach with a checkered past who claims to have injected Clemens with HGH and steroids in 1998, 2000 and 2001.

McNamee’s claims were included in a 2008 report by former senator George Mitchell about the prevelance of steroids in baseball. A House committee then began looking into the report, and Clemens denied the allegations to Congressional investigators and during a nationally televised hearing. Those denials formed the basis of a federal grand jury indictment charging Clemens with perjury, obstruction of Congress and making false statements.

McNamee’s character and credibility is under aggressive attack by defense attorneys – and he hasn’t even testified yet. Prosecutor Steven Durham on Tuesday even accused defense lawyers of “character assassination” of McNamee, who is sure to have a tough time on the witness stand.

That is why Pettitte is considered an important government witness: He had nothing to gain by testifying against his former teammate and “good friend” and had been consistent about the content of their conversation about HGH in 1999 or 2000.

Read the Post’s full coverage of Tuesday’s testimony.

This item has been updated.

Read more: Clemens trial coverage | Del Wilber on Twitter | Ann Marimow on Twitter