LAS VEGAS (KLAS) — A 20-year-old shot and killed a man in an attempted robbery and later texted his roommate about it, leading to his arrest a week later, police write in documents the 8 News Now Investigators obtained Tuesday.

Las Vegas Metro police arrested Maliek Hunter, 20, on Jan. 3, records showed. Hunter faced charges of open murder with a deadly weapon, conspiracy to commit robbery and attempted robbery.

On Dec. 26, Metro responded to reports of an unresponsive man on the ground near the intersection of Warm Springs and Bermuda roads in the south valley. According to police, arriving officers found the 59-year-old man, identified as Shalom Amar, with two gunshot wounds.

Police located several cartridge casings near Amar’s body, they said. Police suspect Hunter shot Amar outside of his home. Police also said they found a large amount of cash in Amar’s jacket.

Detectives later learned the victim had spoken with a person on Facebook about buying a used car. Amar agreed to meet a person to buy a car for $10,500 at a gas station near his home, police said. The reason for meeting at the gas station was to ensure a safe transaction in a well-lit environment, documents said.

The victim later gave his home address to the person with whom he was talking. Police suspect the Facebook user planned to rob the victim all along, they wrote in court documents.

Detectives said they linked Hunter to the victim’s murder from cellphone records. In addition, a car Hunter owns is the same make and model the victim was attempting to buy before he was murdered, they said.

A week after the victim’s murder on Jan. 2, a Metro officer responded to Hunter’s apartment for an unrelated call.

“Maliek stated his roommate had threatened him, over text message and video call, due to Maliek attempting to evict him,” police said. “Maliek allowed [the officer] to review the content of his text message thread with his roommate. [The officer] was unaware of the [homicide] investigation, observed Maliek’s roommate had text messaged Maliek, stating Maliek had disclosed to him that Maliek had shot someone the week prior.”

“You said you killed someone on a lick with your homies last week,” part of the message read, according to police.

On Jan. 3, Hunter called Metro police again about his roommate, officers said. Responding offices then took Hunter into custody.

A search of Hunter’s car found cartridges matching the ones found at the homicide scene, police said. A search of Hunter’s phone also found an email address tied to the phone number, with which police said the victim was conversing. Hunter also reportedly searched the keywords “Las Vegas” and “homicides.”

Hunter initially denied any involvement in the murder, but later admitted to attempting to rob the victim with a friend, police said.

“I initiated the robbery,” police said Hunter told them. “I shot first. I was trying to shoot him in the leg to wound him to give us the money.”

Due to his murder charge, Hunter was first held without bail. Judge Joseph Sciscento later set bail at $350,000, records showed. Hunter remained in custody as of Tuesday.