I killed grandma with a fake elephant tusk, a deranged Hamilton Heights man told cops in a bizarre confession made public today.

It was kill or be killed — because the granny was planning a voodoo hit on him, Dominick Anderson claimed as he was questioned after the freaky, Dec. 19 murder in his family’s St. Nicholas Avenue apartment.

“I killed my grandmother with a cream colored elephant tusk and I did it because she was trying to have me killed,” Anderson, 26, said of the attack, which left the tusk in pieces, the grandmother, Beverly Holmes, 62, dead, and Anderson’s sister injured.

Anderson allegedly then turned the tusk on his arresting officers, who were treated for scratches and bumps. He has been charged with first degree murder, kidnapping and assault.

“She started doing some voodoo sh– and tahat’s when it triggered me off,” Anderson tells cops in his confession.

“My mother ran out the door and me and my grandmother and sister started fighting. When the fight ended, I was standing up and she was laying down.

“I don’t remember how we were fighting but I remember that we were fighting and that they probably didn’t like what I did and I didn’t like what they did.”

“There are clearly mental health aspects in play,” said Anderson’s court appointed lawyer, Sam Roberts.

Anderson pleaded not guilty in Manhattan Supreme Court and is being held without bail; he returns to court March 27.