Family members have a constitutional right to keep a loved one's autopsy photos private and can sue law enforcement officers who release the pictures to the news media, a federal appeals court ruled Tuesday.

"Few things are more personal than the graphic details of a close family member's tragic death," said the Ninth U.S. Circuit Court of Appeals in San Francisco.

The court said close relatives are entitled to protect a family member's "memory and images" from "unwarranted public exploitation by the government." But because it was the first ruling to declare such a right, the court denied a mother's damage claim against a San Diego prosecutor who sent photos of her dead 2-year-old boy to a newspaper and a television station after a murder conviction in the child's death was overturned.

The prosecutor had no way of knowing that he was violating the privacy rights of the boy's mother, the court said, citing the doctrine that officials can be held liable only after a constitutional right is clearly established. Damages will be allowed in future cases, the court said.

Donnie Cox, a lawyer for the mother, Brenda Marsh, said Marsh would be "gratified that this will not happen to anybody else." Cox said Marsh still has a claim against the prosecutor for violating a California privacy law and would seek damages for emotional distress in a state court.

Marsh's 2-year-old son, Phillip Buell, died from a head injury in 1983 while under the care of her boyfriend, Kenneth Marsh, now her husband. Kenneth Marsh said the boy had fallen off a couch and landed on his head, but he was convicted of second-degree murder and sentenced to 15 years to life in prison.

He served 21 years before defense lawyers obtained medical evidence that suggested the death was an accident. Prosecutors agreed to set his conviction aside, and a state compensation board declared him innocent in 2006 and awarded him $756,000 in compensation from a fund for the wrongly imprisoned.

Around the same time, Jay Coulter, the former deputy district attorney who had prosecuted Kenneth Marsh, sent a newspaper and a television station copies of the boy's autopsy photo along with an essay he had written supporting the murder conviction. The media outlets did not publish the photos, but Brenda Marsh sued Coulter and the county for disclosing them.