DOYLESTOWN, Pa. — Prosecutors charged a second suspect on Friday in connection with the killing of four young men who went missing last week in the suburbs of Philadelphia, confirming reports that the initial suspect, who confessed on Thursday, had an accomplice.

Formal charges filed in Bucks County Court of Common Pleas accuse Sean M. Kratz, 20, of one count each of criminal homicide and conspiracy to commit criminal homicide, along with a host of related charges, including abuse of a corpse.

The initial suspect, Cosmo DiNardo, also 20, was charged Friday with four counts each of homicide, conspiracy to commit homicide and abuse of a corpse. Published news reports have said that Mr. DiNardo told investigators that he had burned the bodies.

The arrest of Mr. Kratz, who has a history of burglary, theft and related arrests, widens the scope of an already sprawling case that has involved a large-scale hunt for the victims, searches of multiple properties, and an excavation on a farm that yielded human remains, including those of at least one of the missing.

Mr. DiNardo, whose parents own the farm where the remains were found, confessed on Thursday afternoon, in exchange for prosecutors agreeing not to seek the death penalty, one of his lawyers told reporters. He has been described by prosecutors, his own lawyers and the police as mentally ill — last summer, he was sent involuntarily to a mental hospital — and another young man who socialized with him and two of the victims said Mr. DiNardo had talked about killing people and having people killed.

As the authorities led Mr. DiNardo into a police van on Thursday evening, reporters asked him whether he had any sympathy for the victims’ families. “I’m sorry,” he said.

Criminal charges were lodged against Mr. Kratz three times in eight months. Two of those cases, both in Philadelphia, are still pending: He was arrested in June 2016, and again in February, and each time he was charged with burglary, theft, receiving stolen property, and related charges.

Last December, he was arrested at a shopping center in Abington, in Montgomery County, and charged with theft, receiving stolen property, possessing instruments of crime and drug possession. That case is listed as closed, though how it was concluded is not clear.

Court records show that Mr. Kratz lives in Ambler, in Montgomery County, a few miles from Bensalem, where Mr. DiNardo lived and three of the victims went to school. Mr. DiNardo apparently knew all four.

On Wednesday, District Attorney Matthew D. Weintraub of Bucks County said that the remains of one of the missing men, Dean Finocchiaro, 19, had been found in a 12.5-foot-deep “common grave” on the sprawling farm in Solebury, Pa., owned by Mr. DiNardo’s parents. Officials have not said whether they have identified — there, or elsewhere — the remains of the other men, Mark Sturgis, 22; Thomas Meo, 21; and Jimi Taro Patrick, 19.

The Bensalem Police Department had frequent dealings with Mr. DiNardo, according to the department’s director, Frederick Harran, but he would not elaborate.