A shooting inside a Montgomery County home this week that left a 21-year-old dead occurred when two friends tried to scare him with a loaded rifle they thought would only make a loud bang because it had been malfunctioning, the friends told police.

“I really do feel real bad about what happened,” one of the suspects, Andrew Ramos, 19, said in a brief interview Friday.

Ramos has been charged with reckless endangerment in the Wednesday death of Hugo Yupe. The second suspect, Christopher Edwards, 20, pulled the trigger, according to police, and has been charged with second-degree murder and reckless endangerment. Edwards appeared in court Friday, when Montgomery District Court Judge Patricia Mitchell ordered him held on a $250,000 bond.

Arrest records made public Friday are based largely on what the two suspects told police. They paint a picture of a tragic incident.

About 3:20 p.m. Wednesday police were called to Edwards’s house on Superior Street in Aspen Hill. They were met by Edwards, who said a man had been shot.

Officers found Yupe’s body on a bed with “an obvious gunshot wound to his facial/neck area,” police said in court papers.

Edwards first told detectives that Yupe had been shot by a man whom he called “Chuckie” and said had left the house, court papers say. Detectives learned the man’s real name was Andrew Ramos and his nickname was “Chubs.” They showed Edwards a photo of Ramos, and Edwards identified him as the man who shot Yupe, according to police accounts.

Detectives found Ramos and questioned him, court papers say. He told them that although he had fired the gun once inside the house, it was Edwards who shot Yupe.

Detectives went back to Edwards, who then admitted he shot his friend, according to charging papers. Edwards said he and Ramos had been playing with the rifle and saw, after loading it and firing it, that the weapon made a loud bang but it didn’t fire a bullet. They figured that would be the case the third time.

Ramos told police he loaded the gun and gave it to Edwards, knowing Edwards was going to try to scare Yupe, police said.

When reached Friday, Ramos said he didn’t want to talk about the case. “Everything is on paper. I mean everybody knows what’s happening. I just would like to be left alone,” he said.

Yupe had just taken a job as a cook at the CremCaffe, a new espresso bar and restaurant in downtown Rockville. Isaac Abuhsira, the manager, said he hired Yupe over 25 other applicants because Yupe had expressed ambition to be a chef.

“I thought he was a very nice kid who I could grow with,” Abuhsira said Friday. “He wanted to learn.”

As for Edwards, the case is only part of his legal troubles. He also stands charged with first-degree assault from an Oct. 3 incident, in which police say he and a half-dozen others attacked a man so badly he was left with a broken nose and back.

On Friday, Edwards appeared for a bond review in the new case, his image piped into the courtroom via a video feed. Edwards’s mother and father came to court, and his mother stood to briefly address the judge.

“I just wanted him to know I’m here for him,” she said.

Staff researcher Jennifer Jenkins contributed to this report.