Roger Clemens’s chief accuser took the witness stand in the baseball legend’s perjury trial Monday, testifying in vivid detail about steroid injections he said he gave his former friend and his regret at having done so.

“Enabling a star pitcher to inject himself with an illegal substance — I don’t think you forget that, ever,” Brian McNamee said at federal court in Washington of the first injection he gave Clemens in 1998. “I did what I was asked. I made a mistake, and I wish to God I could take it back right now.”

McNamee, 45, is considered the key prosecution witness in the trial of Clemens on charges he lied to Congress in 2008 when he denied ever having taken performance-enhancing drugs.

A former Major League Baseball strength coach, McNamee worked with Clemens when “The Rocket” pitched for the Toronto Blue Jays and, later, the New York Yankees. He also acted as Clemens’s personal trainer over the years.

The coach is the only person with direct knowledge of the injections of steroids and human growth hormone (HGH) he alleges he gave Clemens between 1998 and 2001.

Brian McNamee arrives at the federal court in Washington. (Susan Walsh/AP)

Those allegations were included in a 2007 report by former senator George Mitchell about rampant steroid use in baseball. McNamee reiterated them at a hearing before the House Committee on Oversight and Government Reform; Clemens’s denials to House investigators during that hearing led a federal grand jury to indict him in 2010 on charges of perjury, obstruction of Congress and making false statements.

Defense attorneys are expected to delve into McNamee’s checkered background, including his problems with alcohol and run-ins with law enforcement. Whether jurors believe McNamee’s testimony will likely go a long way toward determining the trial’s outcome.

McNamee, who was once so close to Clemens that the ace pitcher allowed him to live in his apartment in the Toronto Skydome, never looked at him Monday as he testified before a courtroom packed with attorneys, reporters and baseball enthusiasts.

Instead, he swiveled in his chair to direct testimony to jurors. It was the first time McNamee and Clemens were in the same room since they testified at the same table before lawmakers in 2008.

McNamee said he met Clemens when he joined the Blue Jays as the team’s strength coach in 1998 and that the former star pitcher first broached the subject of getting an injection by asking for a “booty shot” of anabolic steroids.

He testified that Clemens knew he could give an injection because he had told the pitcher about the shots he gave his diabetic son. So, one day in 1998, Clemens summoned McNamee to his apartment and directed him to a bathroom. There, Clemens had laid out a syringe, an ampule of steroids, alcohol and gauze.

“It was a little uncomfortable,” McNamee said, holding up two fingers to demonstrate the size of the glass ampule he had to crack before making the injection.

Another time, McNamee said, he injected Clemens in a utility closet of the Tampa Bay Devil Rays stadium, keeping one foot on the door because it didn’t have a lock.

Clemens did not have a prescription for the substances, and McNamee said he did not have the authority to give players shots of any substance. “I knew what I was doing was illegal,” McNamee testified.

When asked why he didn’t query Clemens about where he had gotten the performance-enhancing drugs, McNamee said: “Don’t ask, don’t tell. . . . I didn’t want to know.”

The son of a New York City police officer, McNamee grew up in Queens and played catcher on his school and college baseball teams, he said. After a three-year stint on the New York Police Department, he joined the Yankees as a bullpen catcher and batting practice pitcher. He eventually became a strength coach and joined the Blue Jays in 1998.

When asked by Assistant U.S. Attorney Daniel Butler what it was like getting to work with Clemens, McNamee became visibly emotional and paused. “Can you give me a minute?” he said. “It was great working with the best. My job was to help these guys. Roger was one of the best. I was getting a chance to work with the best pitcher in baseball.”

McNamee is expected to be savaged by defense lawyers who have called him a “serial liar” in court papers. McNamee lied to police investigating a sexual assault in Florida in 2001. The Yankees declined to renew his contract after the incident.