Dallas Smith was angry. Jerry Scott, 84, had kicked his grandson out of his Alexandria home. So a month later, Smith returned in the middle of the night with a handgun he made from parts bought online, went to a basement bedroom and shot at Scott six times.

Bullets hit the man in the head, chest and arm, but he was still alive, according to a medical examiner. So Smith charged him with a knife and tried to cut off his head, burying a piece of the homemade blade in his grandfather’s neck.

He then slashed at Scott’s face and scalp, according to a statement of facts read by Alexandria Commonwealth’s Attorney Bryan Porter in circuit court Monday as Smith, 32, pleaded guilty to first-degree murder.

The murder happened sometime between a late Saturday night and early Sunday morning last July, but Scott’s body was not found by his daughter, Smith’s aunt, until Monday. Nothing had been stolen, and while there was blood on the stairs and door to the basement bedroom, there was no damage suggesting a break in. Smith’s fingerprints were found in the bedroom where Scott was killed, and surveillance video repeatedly showed him near the house between 1 and 3 a.m. that night. He was arrested two days after the body was found, on July 25. According to the statement of facts, he was carrying a Glock recoil spring, a black ski mask and keys to a storage unit.

While waiting in an interview room at the police station, Smith tried to swallow some paper. It turned out to be two business cards for a public storage facility in Fairfax County.

When authorities searched his unit there, police found 9mm ammunition, two shoulder holsters, a Glock 9mm magazine and an empty box labeled Glockstore.com. Later, sales orders showed Smith had purchased from the California company all the parts necessary to make a Glock 9mm pistol, according to the statement of facts. The search history on his phone from the day before the attack included “Glock 19 rapid fire,” “Methods of stalking,” and “How to sneak up on the enemy.” After the attack, he searched “3 effective ways to remove blood stains,” “Removal of DNA contamination” and “Altering barrel rifling.” He also looked for news articles about his grandfather’s death.

Police found a large blood stain on the inside of Smith’s pants pocket the day of his arrest, but the full gun was never found.

Scott’s daughter told police her father had kicked Smith out for ordering gun parts and having them shipped to the house, according to the statement of facts. Smith was not allowed to have guns because he has a felony conviction from 2009, when he was caught carrying a pipe bomb in Baltimore.

Smith is set to be sentenced on May 23, when he faces up to life in prison.

“It’s very sad for the entire family,” said Robert Jenkins, Smith’s defense attorney. He said Smith “suffers from a long history of mental health issues,” including schizophrenia and bipolar disorder, although “he certainly understands what he did and that what he did was wrong.”