Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Cosmo DiNardo, the 20-year-old man who allegedly admitted to killing four missing men in Pennsylvania, was officially charged on Friday. But he wasn't the only one.

DiNardo faces four counts of criminal homicide, conspiracy to commit criminal homicide, and abuse of corpse, as well as 12 other charges.

On Friday, Sean Michael Kratz, 20, was also charged with criminal homicide, according to court documents. Officials had brought him in for questioning the day before.

Kratz faces three counts of criminal homicide, three counts of conspiracy to commit criminal homicide, three counts of abuse of corpse and 11 other charges.

According to NBC Philadelphia, Kratz was arrested by Philadelphia police late on Thursday at his home in the city.

Related: Cosmo DiNardo Confesses to Killing Four Missing Men in Pennsylvania

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The murders occurred over a few days in early July. All four men — identified as Jimi Taro Patrick, 19, Dean Finocchiaro, 19; Thomas Meo, 21; and Mark Sturgis, 22 — met with DiNardo and Kratz to purchase large quantities of marijuana, according to the Bucks County District Attorney's office, though it remains unclear if drugs were the motive behind the killings.

"I don't know [why DiNardo and Kratz killed them]," Bucks County District Attorney Matthew Weintraub told reporters on Friday. "We may never know."

At DiNardo and Kratz's arraignment later in the day, both men entered a plea of not guilty.

Bucks County District Court Judge Maggie Snow scheduled the men's preliminary hearings on July 31 and set no bail. She also ordered that they not be placed in the same prison out of concern for their safety.

DiNardo admitted to the four murders on Thursday and told authorities where to find the bodies, according to his attorney Paul Lang.

The body of one of the men was found at the bottom of a 12½-foot-deep grave on a farm in Bucks County owned by DiNardo's parents. The three other victims were found in a metal tank that was buried on the farm, according to the affidavit.

DiNardo told police that he agreed to sell Patrick four pounds of marijuana for $8,000 and brought him to the farm on July 5, according to the probable cause affidavit. Patrick only had $800, so DiNardo offered to sell him a shotgun instead. He then took Patrick to a remote part of the property, shot him with a .22 and buried him with a backhoe, according to the affidavit.

A law enforcement official escorts Cosmo DiNardo to a vehicle on July 13, 2017 in Doylestown, Pennsylvania. Matt Rourke / AP

Two days later, DiNardo offered to sell a quarter-pound of marijuana to Finocchiaro for approximately $700, the affidavit said. On the way, DiNardo picked up Kratz and allegedly gave him a .357 handgun. They allegedly agreed to rob Finocchiaro.

While at the farm, Kratz shot Finocchiaro in the head, according to DiNardo's statement to police. DiNardo then took the gun and allegedly shot Finocchiaro while he was on the ground. They used a backhoe to place the body in a metal tank that DiNardo referred to as a "pig roaster," the affidavit said.

On the same day, the affidavit said, DiNardo met with Meo and Sturgis not far from the farm and brought them back to the property under the guise of a marijuana deal. Kratz waited for them, as he and DiNardo agreed to rob the pair.

When they returned to the farm, DiNardo allegedly shot Meo in the back and shot Sturgis as he tried to run away with the .357 handgun.

He then allegedly ran over Meo, who was still alive, with the backhoe before lifting both men's bodies in a metal tank. He poured gasoline inside and lit them on fire.

He buried the tank the next day with Kratz's help.

Kratz's statement to police on Thursday was similar to DiNardo's, though he claimed he did not shoot anyone.

DiNardo was originally arrested on Monday for an unrelated gun charge. He is not allowed to own a gun because of his history of mental illness.

The Philadelphia Inquirer reported that his lawyers claim he is schizophrenic.