By Ian Simpson

WASHINGTON (Reuters) - Former baseball star Roger Clemens scored a legal victory on Monday when the judge in his perjury trial barred prosecutors from asking a former teammate where got his steroids.

The ruling came on the opening day of Clemens' second trial on charges of lying to a congressional committee about whether he used performance-enhancing drugs.

U.S. District Court Judge Reggie Walton also said the defense could imply Congress acted improperly in holding a hearing with Clemens in 2008. Clemens, who was one of baseball's elite pitchers during his 24-year career, insisted at that hearing he had not used steroids. He was indicted in 2010 for perjury and obstruction.

Prosecutors will be allowed to counter that Congress was within its rights to demand Clemens' presence at the hearing, which focused on the use of performance-enhancing substances in professional baseball.

Prosecutors could be hurt by Walton's ruling barring them from asking former Clemens' teammate Andy Pettitte where he acquired the human growth hormone he admitted using. Prosecutors had hoped to tie Clemens to the same supplier of banned substances that Pettitte used - Clemens' former trainer Brian McNamee.

Defense attorneys say McNamee is a liar and have said they challenge key physical evidence handed over to prosecutors by the trainer.

The rulings came just as attorneys for Clemens and the U.S. government were expected to make opening arguments in the case. Earlier the sides agreed on a jury of six men and 10 women - 12 of whom will act as primary jurors and four as alternates for the trial, which may run as long as six weeks.

Throughout the morning's proceedings, Clemens sat forward in his chair with his back to spectators. He made no public statements in the courtroom.

Clemens, 49, a record seven-time winner of the Cy Young Award as his league's best pitcher, first went on trial last July. Walton declared a mistrial after two days because prosecutors showed jurors a video clip that included material the judge had banned from the case unless it was raised by Clemens' defense team.

Walton agreed to a new trial after prosecutors said the error in the first attempt was not intentional.

The allegations that Clemens used performance-enhancing drugs have raised questions about his record. Clemens, known as "The Rocket" during his prime, played for Boston, Toronto, Houston and the New York Yankees and last pitched in 2007.

His is one of the biggest names linked to steroid use in baseball. Other stars who have faced questions about doping include sluggers Mark McGwire, Jason Giambi and home-run king Barry Bonds.

(Reporting by Ian Simpson; Editing by Jackie Frank and Bill Trott)