A 23-year-old Clover man who police say tried to dig up the grave of a 12-year-old girl after seeing her picture in an obituary has been sentenced to 20 years in prison.

Bryan Nicholas Garcia never did find the girl's grave and told investigators he wanted to "take her home and have fun," Clover Police Lt. Randall Horn said.

Garcia pleaded guilty but mentally ill Wednesday to two charges of destruction of a graveyard. Circuit Judge John Hayes sentenced Garcia to 20 years in prison and ordered him to register as a sex offender.

Two mental evaluations found Garcia has a chemical imbalance in his brain that makes him want to have sex with corpses and children, defense attorney John Rhea said.

Garcia hasn't decided whether to appeal, Rhea said.

Garcia was arrested in May 2005 after running through a grocery store where he once worked in a full-length green coat, black sweater, camouflage gloves and a mask.

Officers searching his car found a black plastic bag, shovels, a pickax and other digging tools, prosecutor Dan Hall said.

Garcia then told police he was embarrassed because he had been trying to dig up the girl's grave, Hall said.

"He had seen the name of a little girl in the obituaries in the paper," Hall said. "He thought she was cute and he wanted to take her home."

Deputies went to the cemetery and found a hole about 3 feet deep. Garcia told them he dug at the cemetery twice, but never located the girl's body, Hall said.

Garcia, who was a National Merit Scholar at York High School, told the girl's family he was sorry. "I apologize to anyone I've hurt with my actions," he said.

Clover is about 20 miles southwest of Charlotte, N.C.