To continue getting breaking news and the full stories from The Boston Globe, subscribe today.

The Boston Globe

Metro

20-year-old charged in Haverhill double slaying

Family and friends of Carlos Sanchez reacted as he was arraigned in Haverhill District Court.

Paul Bilodeau/Lawrence Eagle Tribune

Family and friends of Carlos Sanchez reacted as he was arraigned in Haverhill District Court.

HAVERHILL — In a burst of gunfire inside a River Street apartment last week, prosecutors say, Juan Carlos Sanchez fatally shot the man he came to rob and in the ensuing chaos mistakenly shot a coconspirator.

Carlos Sanchez returned to his cell after his arraignment.

Paul Bilodeau/Lawrence Eagle Tribune

Carlos Sanchez returned to his cell after his arraignment.

Sanchez, 20, was arraigned Monday in Haverhill District Court, charged not only with murder in the slaying of ­William Melchionda, who lived at 629 River St., but also with murder in the death of Anddy Guzman, who was found dead in the backyard of the multifamily house on July 23. Two others were also shot, but not fatally, authorities said.

Authorities and witnesses said that Guzman, Sanchez, and an unidentified third person were wearing masks and that at least one of them had a pistol holder, as they burst into Melchionda’s home.

Family members of Sanchez appeared in court Monday to support him.

“We love our son and believe in him and will stand by him until the day we die,” Sanchez’s father said, requesting that his name not be published. He ­attended his son’s arraignment and left the courtroom without speaking, but commented later at his residence. He said his son was unemployed and lived in Lawrence with his girlfriend.

“He had issues, just like any other gentleman, but he didn’t do what they’re claiming he did,” he said.

The moment Sanchez ­appeared in the courtroom, several of his relatives started crying. He glanced at them and his father before casting his eyes downward while his attorney, Ronald Ranta, acquiesced to the prosecutor’s request that Sanchez be held without bail pending an Aug. 30 probable cause hearing. Ranta pleaded not guilty on his client’s behalf.

According to a police report contained in court records, Sanchez allegedly told a woman that he knew that Melchionda, 19, was dealing drugs and kept large amounts of cash and guns in his apartment. Sanchez ­allegedly told the woman he wanted to rob Melchionda.

Last week, several of ­Melchionda’s friends denied accu­sations that he sold drugs.

The police report states that three masked men holding handguns entered the apartment from a rear door and went into the kitchen, where they started pistol-whipping two people. Two of the gunmen then went to the living room and told two other people, who were sitting on the couch, to empty their pockets.

As the victims started emptying their pockets, a gunman shot them. The third gunman then went to the front bedroom and shot a man, later identified as Melchionda.

Critically injured, Melchionda, pursued by two gunmen, ran outside but collapsed on the sidewalk about 50 feet away. Soon afterward, about seven other victims ran outside as the gunmen fled, according to the account.

Police said they interviewed a witness who said Sanchez admitted shooting Guzman, “one of his co-home invaders” by mistake in the robbery. Sanchez allegedly told the witness that after he shot Guzman, he rolled him over and took his gun.

Sanchez was charged with two counts of murder, home ­invasion, and multiple counts of firearms-related offenses.

Authorities did not say whether any weapons or drugs were found in Melchionda’s apartment and did not say whether they have identified or located the third gunman.

Minutes after Sanchez’s arraign­ment, Matthew Rogers, 26, of Lawrence, was arraigned on charges that he knowingly tried to help Sanchez flee.

Prosecutor Ashlee Logan, who handled both cases, said Sanchez attempted to hide in the back seat of Rogers’s sport utility vehicle Sunday, but ­police spotted him, sparking a foot chase that ended with ­Sanchez’s capture.

Judge Patricia Dowling ­ordered Rogers, charged with accessory after the fact of murder and hindering an investigation, held on $25,000 cash bail.

His attorney, Rebecca Whitehill, characterized the case against her client as ­“incredibly flimsy” and entered a plea of not guilty on her client’s behalf. Rogers is due back in court Aug. 28 for a probable cause hearing.

Rogers’s sister, Linda ­Alestock, said after the arraignment that her brother was simply giving Sanchez a ride and was unaware he was being sought by police in a double ­homicide. “Of all people, he had to jump into my brother’s car,” Alestock said.

Brian R. Ballou can be reached at bballou@globe.com.