A federal grand jury Thursday indicted former baseball pitching ace Roger Clemens on charges of lying to Congress when he repeatedly denied under oath that he had used anabolic steroids or other performance-enhancing drugs.

According to the indictment, the seven-time Cy Young Award winner “well knew” that he was trying to hide the truth from a House oversight committee in 2008 when he said: “Let me be clear. I have never taken steroids or HGH” — human growth hormone, another banned drug.

If convicted, the onetime pitching star for the Boston Red Sox, Toronto Blue Jays, New York Yankees and Houston Astros faces up to 30 years in prison and a $1.5-million fine.

Clemens responded to the indictment with a Twitter message: “I never took HGH or steroids. And I did not lie to Congress.”

The 11-time All Star added: “I look forward to challenging the government’s accusations, and hope people will keep an open mind until trial. I appreciate all the support I have been getting. I am happy to finally have my day in court.”

A close reading of the indictment shows it offers no direct proof that Clemens ever used the banned drugs during his 23-year career on the mound. Rather, it alleges that others say he did and that he then lied to Congress in denying their assertions.

The charges against Clemens mark the second time a Major League Baseball player has been prosecuted for allegedly lying to Congress, and they signal that federal investigators are far from done examining the drug scandals that for years have swirled around players who suddenly grew bigger and stronger as they extended their careers.

In February 2009, all-star shortstop Miguel Tejada with the Houston Astros pleaded guilty to lying to Congress about using performance-enhancing drugs. He was sentenced to a year of probation after he apologized to Congress, the court and to baseball fans.

Clemens, who turned 48 on Aug. 4 and last pitched in 2007, amassed a phenomenal record with 354 wins, 4,672 strikeouts and a lifetime earned-run average of 3.12.

With more than 300 victories, Clemens would be a lock for the Hall of Fame when he becomes eligible in 2013 were it not for allegations of cheating. He is set to make his first appearance on the ballot the same year as sluggers Barry Bonds and Sammy Sosa, who also have been accused of using performance-enhancing drugs.

Top law enforcement officials were quick to stress that the indictment underscores the peril for anyone who is not truthful on Capitol Hill.

“Our government cannot function if witnesses are not held accountable for false statements made before Congress,” said Ronald C. Machen Jr., the senior federal prosecutor in Washington whose office sought the indictment.

“Today the message is clear: If a witness makes a choice to ignore his or her obligation to testify honestly, there will be consequences.”

At the heart of the case are two sessions at which Clemens met with congressional investigators probing drug use among Major League Baseball players and repeatedly denied using anabolic steroids or HGH.

When the sessions were over, officials with the House Committee on Oversight and Government Reform suspected that Clemens had lied and referred the matter as a criminal investigation.

Clemens first met with investigators on Feb. 5, 2008, and voluntarily agreed to speak to them under oath in a legal deposition.

The panel was seeking more information after receiving a report by former Sen. George J. Mitchell (D-Maine) about alleged drug use by Major League Baseball players.

In his report, Mitchell stated that “Clemens, while a member of the Toronto Blue Jays and New York Yankees, used anabolic steroids on multiple occasions in 1998, 2000 and 2001, and HGH on multiple occasions in 2000.”

Much of that was based on statements from Brian McNamee, Clemens’ former trainer, who reportedly reached a deal with investigators not to be prosecuted in return for his cooperation.

The indictment against Clemens said the pitcher maintained that not only had he never seen or possessed the drugs, but that he had never even discussed them with anyone.

“I have not used steroids or growth hormone,” he said at one point.

“I am just making it as possibly as clear as I can. I haven’t done steroids or growth hormone,” he said at another.

“I never used steroids,” he said a third time. “Never performance-enhancing steroids.”

But he said he did occasionally see “four or five needles” containing B12 vitamins that would be “already lined up ready to go” in the trainers’ room after games, and that some people might have construed that to be illegal drugs.

Eight days later, he appeared before the committee under oath. Asked about the Mitchell report’s allegation against him, Clemens said, “It is false.” He said a strength trainer “has never given me growth hormone or steroids.”

Asked why others have sworn he did use the drugs, Clemens referred to Yankees teammate Andy Pettitte and said he must have “misheard” or “misremembered” comments Clemens told him 10 years earlier about HGH.

But Victor Conte, founder and head of the Bay Area Laboratory Co-Operative, or BALCO, which distributed then-undetectable steroids to some of the world’s most talented athletes, said the charges came “as no surprise to me.”

“I believe Roger Clemens is in a lot of trouble,” he said.

richard.serrano@latimes.com

Times staff writers Dylan Hernandez and Lance Pugmire in Los Angeles, and Michael A. Memoli in the Washington bureau contributed to this report.