Sheriff's officials in the San Francisco Bay Area defended their decision to release details about how actor Robin Williams killed himself, saying state law requires they be disclosed to the public.

Marin County Sheriff's Lt. Keith Boyd said in an email Wednesday that the agency would have liked to withhold some of the information, but could not under the California Public Records Act.

"These kinds of cases, whether they garner national attention or not, are very difficult for everyone involved," Boyd said. "Frankly, it would have been our personal preference to withhold a lot of what we disclosed to the press [on Tuesday], but the California Public Records Act does not give us that kind of latitude."

Boyd announced during a live, televised news conference that Williams committed suicide by hanging himself. He described in detail how Williams carried out the suicide and the condition of the body.

“Mr. Williams' personal assistant… [found] Mr. Williams clothed in a seated position, unresponsive, with a belt secured around his neck with the other end of the [belt] wedged between the… closet door and the door frame," Boyd told the media. "His right shoulder area was touching the door with his body perpendicular to the door and slightly suspended.”

Some people criticized the level of detail, and experts in suicide prevention said the information could influence those considering suicide to try the same thing.

"Having that amount of detail is not helpful" said Lyn Morris, vice president of clinical operations at Didi Hirsch Mental Health Services, which runs the main suicide prevention hotline in Southern California. "The contagion effect is real, and it's worrisome."

Boyd said the sheriff's office is discussing with the county's attorney possible exemptions to the public record's act that would allow it to withhold the 911 call it received from Williams' home and fire dispatch tapes. But Boyd said the agency would likely have to release them within 10 days, as required by law.

Free speech groups defended the disclosures as appropriate and said the law enforcement agency was responding to a crush of a requests for information required to be disclosed.

"Coroners are not required to provide details by press conference," said Terry Francke, head of open government group Californians Aware. But he said the Marin County Sheriff's Department chose to disseminate as much information as quickly possible at one time rather than leak piecemeal. Some three dozen television cameras and twice as many reporters from around the globe crowded the news conference outside the sheriff's offices Tuesday morning.

"While the impact of the details on some people's mourning of Mr. Williams' passing may have been jarring, keeping what was known under wraps would have added needless speculation if not suspicion to the general shock," Francke said.

The Associated Press contributed to this report.