SAN DIEGO—A man charged with trying to kill his 8-year-old son during a bizarre ritual at a San Diego cemetery has been ruled mentally competent to stand trial.

City News Service says a judge ruled Wednesday that 31-year-old Joseph Ramirez can be tried next May for attempted murder and child abuse. If convicted, he faces up to 13 years in prison.

At an earlier hearing, witnesses say Ramirez took his three kids and their mother to Mount Hope Cemetery in April to visit his uncle's grave.

Once there, Ramirez allegedly had the family drink sangria and eat energy bars, calling it "the last supper," then slashed his son's forearms with a broken candle holder and cut himself.

Ramirez reportedly said he was sending the children to Jesus.