In this July 14 photo, Roger Clemens leaves federal court in Washington after the judge declared a mistrial in his perjury trial. Clemens now faces a retrial in April of next year. (Manuel Balce Ceneta/ASSOCIATED PRESS)

A federal judge ruled Friday that prosecutors will have another chance to try former star pitcher Roger Clemens on charges that he lied to Congress about taking performance-enhancing drugs.

The ruling came during a hearing before U.S. District Judge Reggie B. Walton, who was weighing whether a retrial would violate Clemens’s constitutional rights. Walton said the decision was not an easy one but that he felt he had no choice but to allow prosecutors to move ahead. He set an April 17 trial date.

Clemens went to trial in July in the District’s federal court on charges of perjury, obstruction of Congress and making false statements tied to testimony he gave in 2008 to a House committee. On July 14, just two days into testimony, Walton declared a mistrial after prosecutors played a video tape of House testimony that included information Walton had prohibited from being shown to jurors.

“While I am very troubled by what occurred and it was something that should not have taken place,” Walton said, “I just think that the current state of the law would not justify me concluding on the record we have in this case that the double jeopardy clause bars reprosecution.”

Earlier in the hearing, Walton had castigated government lawyers, saying he had “a hard time reaching any other conclusion” than that prosecutors had intentionally disobeyed one of his orders when they introduced the barred evidence.

Since the mistrial, defense lawyers have argued that the prosecutors’ mistake was so egregious that they should not get another shot in court. A new trial, they have said, would violate the star pitcher’s right to avoid double jeopardy, a legal doctrine meant to protect defendants from repeated prosecutions for the same alleged offense.

On Friday, they added that prosecutors got an unfair preview of their defense and they had tried to make an end run around Walton’s rulings. They also argued that the trial was going so poorly for prosecutors that they intentionally sought to goad defense lawyers into seeking a mistrial.

“We are deeply troubled by what happened,” Clemens attorney Michael Attanasio said in court. “Something has gone wrong here. It continues to this day. That something is a win-at-all-costs mentality. That’s not fair. . . . This case should end. Enough money has been wasted.”

For their part, federal prosecutors countered that they had simply made an innocent mistake and should be allowed another chance in the courtroom. Assistant U.S. Attorney Steven Durham apologized profusely to Walton on Friday, saying he took responsibility for mistakenly introducing the prohibited evidence.

“I would not dishonor the court in this fashion,” Durham said. “I would not dishonor my colleagues.”

At issue during the hearing were orders issued by Walton on the eve of what was expected to be a four- to six-week trial.

Before jury selection in the first week of July, Walton had barred prosecutors from referencing information provided by Laura Pettitte, wife of former star pitcher Andy Pettitte. It was anticipated that he might be a star witness for the government because he was expected to testify that Clemens confided to him that he had taken a performance-enhancing substance.

When prosecutors played videotaped excerpts of congressional testimony that included references to Laura Pettitte buttressing her husband’s story, defense attorneys sought a mistrial.