Judge Al Girolami said he believed the gag order was the only way to stop leaks and rumors from derailing Scott Peterson's right to a fair trial. Violators face contempt charges.
The ruling came the same day another judge in Stanislaus County Superior Court ordered search warrants in the case unsealed, but postponed their release until July.
Girolami cited widespread publicity about the case in issuing his order. Without it, the judge said "rumors and gossip would be rehashed shortly before trial thereby making it extremely difficult to select a fair and impartial jury."
At a hearing last week, prosecutors had asked for a limited gag order. Defense lawyer Mark Geragos responded that such a ruling would harm his ability to defend his client.
"The people who actually know what the facts are end up kind of being muzzled, if you will," he said.
He was joined in his opposition by a lawyer for Peterson's former girlfriend, Amber Frey, who is expected to be a key witness, and an attorney representing newspapers and broadcasters.
Earlier Thursday, Judge Roger Beauchesne ruled that that there was no reason to keep eight search warrants and related police reports sealed because Peterson has been arrested and charged with the murders of his wife and unborn son.
The documents include affidavits by police giving their reasons for the searches and inventories of items seized.
Beauchesne had ruled in April — about two weeks before Peterson's arrest — that the documents, usually made public 11 days after search warrants are served, would remain sealed until July but could be made public immediately after an arrest was made.
Prosecutors appealed that decision, saying the ruling could jeopardize their investigation. A state appeals court ordered the documents remain sealed until July 7 to allow for further appeals. Beauchesne said Thursday that the documents could be released July 8.
Scott Peterson's lawyers also oppose the release of the documents, saying it would hurt their efforts to find the real killers. They have suggested a satanic cult may have abducted and killed the pregnant 27-year-old substitute teacher who vanished just before Christmas.
Peterson was arrested after his wife's body and the remains of their unborn son washed ashore in San Francisco Bay. He has denied any involvement in his wife's disappearance and said he was out fishing in the bay the day his wife disappeared.