GUANTANAMO BAY NAVAL BASE, Cuba — The self-styled terrorist mastermind of the Sept. 11 attacks lectured a military court on government hypocrisy Wednesday and wore a previously banned camouflage vest to his pretrial hearing before being rebuked by the judge for his comments.

Khalid Sheikh Mohammed was in court as part of a weeklong hearing focusing largely on the secrecy rules that will govern legal proceedings against him at the U.S. base in Cuba.

Mohammed was allowed to wear a hunting-style camouflage vest with his white tunic and turban over the objections of prosecutors, who feared it might disrupt the proceedings.

It had no apparent effect, but his five-minute speech denouncing the government's arguments about the need to protect national security transfixed the court and drew a reprimand from the judge.

Until that point, the 47-year-old Mohammed sat quietly through a day of courtroom arguments on proposed rules for handling classified evidence in the war-crimes case. When he finally spoke, it was to point out what he saw as the prosecution's hypocrisy for seeking to keep secret some details of what happened to him during years of captivity in the CIA's secret prisons.

Mohammed told the judge, Army Col. James Pohl, that "the government uses national security as it chooses," urging him to keep that in mind as he considers requests from defense lawyers and the American Civil Liberties Union to scale back the rules for evidence and testimony.

In an apparent reference to Osama bin Laden, Mohammed noted that "the president can take someone and throw them into the sea in the name of national security."

He also made an oblique reference to Anwar al-Awlaki, the American-Yemeni militant killed in a September 2007 U.S. drone strike, and told the judge not to be affected by the "crocodile tears" of prosecutors when they refer to the nearly 3,000 people killed in the 2001 attacks.

"When the government feels sad for the killing of 3,000 on Sept. 11, we also should feel sorry that the U.S. government ... has killed thousands of people," Mohammed said, before correcting himself to say millions of people.