Lance Armstrong’s lawsuit against the U.S. Anti-Doping Agency was dismissed hours after it had been filed Monday, with the judge resoundingly chastising his legal team for failing to properly write the complaint.

In a tersely worded three-page response to Armstrong’s 80-page brief and request for a temporary restraining order against USADA, which in June accused the seven-time Tour de France champion of engaging in a massive sports doping conspiracy, U.S. District Court Judge Sam Sparks gave Armstrong’s legal team 20 days to refile the complaint.

The judge, raising the threat of sanctions if future pleadings did not meet the required format, advised Armstrong’s attorneys to “omit any improper argument, rhetoric, or irrelevant material” from the amended brief. Armstrong’s Austin-based attorney, Tim Herman, said early Monday night the lawsuit would be refiled by Wednesday at the latest.

“We will refile in a format that conforms to what Judge Sparks wants,” Herman said in a phone interview. “Obviously, I would have preferred not to have the order — I’d be lying if I said otherwise — but Judge Sparks is very straightforward, to say the least. When he speaks, I listen.”

In the complaint filed in U.S. District Court in the Western District of Texas before 10 a.m. Monday, Armstrong alleged that USADA and chief executive Travis Tygart had engaged in an obsessive, unlawful and meritless campaign to strip him of his Tour titles and ruin his legacy.

But Sparks dismissed the complaint within about six hours, noting that Federal Rule of Civil Procedure requires a short and plain statement of the basis for the court’s jurisdiction and the plaintiff’s legal claim for relief.

“Armstrong’s complaint is far from short, spanning eighty pages and containing 261 numbered paragraphs, many of which have multiple subparts,” Sparks wrote. “Worse, the bulk of the paragraphs contain ‘allegations’ that are wholly irrelevant to Armstrong’s claims — and which, the Court must presume, were included solely to increase media coverage of the case, and to incite public opinion against the Defendants.”

Sparks is a 1991 appointee of President George H. W. Bush.

Herman said Armstrong’s legal team remained undeterred despite the judge’s harsh language, but John P. Collins, a Chicago-based attorney who has handled anti-doping cases, said the ruling “is not a positive sign for Lance.”

“I agree with the judge: This was written like a press release, like a novel,” Collins said Monday night. “That’s a big slap at [Armstrong]. I think the judge said to him, why did you make me spend my entire day reading 80 pages? This judge in West Texas is probably saying: ‘I am not trying this case in the media. I don’t need an O.J. [Simpson] case.’ ”

Armstrong had asked the court to enjoin USADA from enforcing a Saturday deadline requiring that Armstrong either accept USADA’s proposed penalty — a lifetime competition ban and the loss of his seven Tour titles — or contest its charges through what the lawsuit claimed was a corrupt adjudication process “rigged to ensure that it cannot lose.”

After the suit was filed Monday, USADA said in a release, “like previous lawsuits aimed at concealing the truth, this lawsuit is without merit and we are confident the courts will continue to uphold the established rules which provide full constitutional due process and are designed to protect the rights of clean athletes and the integrity of sport.”

If the court had granted Armstrong’s request, a lengthy legal battle likely would have ensued between Armstrong — backed by attorneys from Washington firms Patton Boggs and Williams & Connolly and Austin’s Howry, Breen and Herman — and USADA, a Colorado Springs-based agency that relies primarily on one in-house attorney and $10 million in federal funding annually.

Now, Armstrong must hope the judge will look favorably on a rewritten complaint to have any hope of avoiding an arbitration hearing by November, the date prescribed in a 15-page charging letter USADA sent Armstrong on June 12.

In that letter, USADA jointly charged Armstrong, former cycling team manager Johan Bruyneel, Italian doctor Michele Ferrari and three other associates from Armstrong’s former pro cycling teams with conspiring to use and distribute performance-enhancing drugs from 1996 through 2010.

USADA, which oversees drug-testing operations for U.S. Olympic sports, typically charges athletes with doping violations after they test positive for a banned substance. Armstrong, who claims to have been tested 500 to 600 times during his career, has never tested positive. It is relatively unusual but not unprecedented for the agency to bring charges without any positive test.

Armstrong, who retired from cycling last year but has taken up triathlons, said he would voluntarily refrain from any competitions until the matter is settled.