Nicodemo “Little Nicky” Scarfo in 1988. (Charles Krupa/AP)

Nicodemo “Little Nicky” Scarfo, whose reign over organized crime in Philadelphia during the 1980s was one of the bloodiest in its history, died Jan. 14 while in custody at the Federal Medical Center in Butner, N.C. He was 87.

Nancy Ayers, a Bureau of Prisons spokeswoman, confirmed the death. The cause was not disclosed.

Mr. Scarfo led the Philadelphia-southern New Jersey mob from 1981, when then-boss Philip “Chicken Man” Testa was killed by a nail-bomb outside his home, until around the time he and more than a dozen associates were convicted of racketeering charges in 1988.

Mr. Scarfo, described as 5-foot-5 with a high-pitched voice, was “a greedy, ruthless despot” who reveled in “wanton, ruthless and senseless violence,” Philadelphia Inquirer reporter George Anastasia wrote in his book “Blood and Honor.” The Philadelphia Daily News once called him “the undersized Atlantic City man with the oversized temper.”

Ultimately, Mr. Scarfo’s vengeance and mismanagement forced several of his associates to be witnesses for prosecutors. One of them, Nicholas “Nicky Crow” Caramandi, said his hand was forced because he believed Mr. Scarfo, widely described as paranoid and egotistical, was ready to kill him.

Mr. Scarfo, a longtime soldier in the Philadelphia Mafia, rose to prominence soon after the assassination of mob boss Angelo Bruno in 1980. Bruno, known as the “Docile Don,” kept a tight rein on his associates’ illegal activities and led a Mafia that made money without a hint of flamboyance.

But Bruno’s killing set in motion a mob war that lasted more than half a decade and left more than two dozen mobsters dead.

“Mr. Scarfo is prone to violence, is unpredictable, and the people he surrounds himself with are equally prone to violence and are unpredictable,” FBI agent James Maher testified in a 1981 court hearing.

Federal prosecutors said Mr. Scarfo’s crews made money the same way La Cosa Nostra always has — through extortion, gambling and loan sharking. But they also accused Mr. Scarfo of embracing the drug trade and said he frequently resorted to murder.

His undoing began in 1986, when he was indicted for trying to shake down a developer who wanted to build a project on the Delaware River waterfront. Mr. Scarfo was convicted of conspiracy to commit extortion in the case, which also brought down a corrupt city councilman.

His reign finally ended in 1988, when he and 16 others were convicted of racketeering. The federal indictment had accused the men of participating in a criminal enterprise that resulted in nine killings and four attempted murders, as well as extortion, gambling, loan sharking and drug trafficking. One of the murder victims was a New Jersey judge.

Prosecutors relied on FBI wiretaps of mob meetings and the testimony of two reputed mobsters-turned-informants, Caramandi and Thomas “Tommy Del” DelGiorno, who detailed killings, extortions and other deals.

Mr. Scarfo and seven others were convicted in state court of murdering mob associate Frank “Frankie Flowers” D’Alfonso in 1985. The 1989 convictions for D’Alfonso’s were later overturned, and all eight were acquitted at a second trial.

Two other convictions on racketeering-related offenses resulted in consecutive 14-year and 55-year sentences for Mr. Scarfo, who had been behind bars since 1989.

Prosecutors portrayed him as a “remorseless and profoundly evil man” and, in the words of Inquirer writer Anastasia, a “greedy, small-minded and violent terrorist who climbed to the top over the dead bodies of onetime associates.”

Organized crime investigators said Mr. Scarfo’s concrete company, Scarf Inc., laid the foundations for many of the casinos erected in Atlantic City in the years after gambling was legalized there. It was an arrangement he enforced through his associations with local unions, authorities said.

Nicodemo Domenico Scarfo was born March 8, 1929, in Brooklyn and grew up in Philadelphia. He was purportedly introduced to gangster life by three of his uncles.

Mr. Scarfo was reputed to be a numbers-runner when, in 1963, he and two companions got into an argument with a longshoreman at a South Philadelphia diner over who would sit in a booth. The longshoreman was stabbed to death; Mr. Scarfo pleaded guilty to manslaughter and served six months in prison.

The violence reportedly angered Bruno, who banished Mr. Scarfo to Atlantic City, to run the family’s outpost there.

Mr. Scarfo served time for refusing to testify about organized crime before a New Jersey commission in 1971, a prison stint that reportedly raised his profile in the organization. He later served two years in federal prison for illegally possessing a gun.

His son was shot in 1989 in one of Philadelphia’s most notorious attempted mob hits. Nicodemo Scarfo Jr. was dining at a crowded Italian restaurant on Halloween night when a masked man shot him several times. He survived.

In July 2015, the younger Scarfo was sentenced to 30 years in prison for a scheme to take over a financial company.