The Pentagon can require its troops be vaccinated against anthrax, a federal judge said Friday.

Judge Rosemary M. Collyer said the Food and Drug Administration acted appropriately when it found the vaccine to be safe and approved its use. She dismissed a lawsuit by military officials who argued the drug is unproven and the scientific data unsound.

"The court will not substitute its own judgment when the FDA made no clear error of judgment," Collyer wrote.

The dispute has languished in the court system for years. A federal judge suspended the vaccination program in 2004 after faulting the FDA's process for approving the drug. After the FDA redid the process and again found it to be safe, the military announced plans to reinstate mandatory vaccinations.

That prompted this latest lawsuit by eight military members who argued the vaccine should be optional. A messages seeking comment was left with Mark Zaid, an attorney for the plaintiffs.

The Pentagon continues to require the vaccine, saying the program is necessary to protect soldiers from anthrax attacks.

"We owe it to our service members to give them every possible protection," Pentagon spokesman Bryan Whitman said. "Force protection is the number one priority in the Defense Department and the anthrax inoculation program is an important force-protection measure."