BOSTON — Rare is the witness who takes the stand and immediately tells the court that he committed eight murders for which he has never been charged.

But amid the stack of murders to which this witness, John Martorano, has confessed, those eight might have gotten lost anyway.

Mr. Martorano, known as The Executioner or The Enforcer, was the longtime hit man for James (Whitey) Bulger, who prosecutors say was at the center of “murder and mayhem” in the Boston underworld for almost three decades. Mr. Bulger, 83, is finally on trial here in federal court on a 32-count indictment, including charges that he participated in 19 murders. Mr. Martorano, a star witness for the prosecution, took the stand Monday against him; it was their first contact in decades, and they barely exchanged a glance.

Mr. Martorano, 72, who wore tinted glasses, sported a pocket kerchief and spoke in a guttural monotone, has confessed to 20 murders. On Monday, he recounted many of them in court in the kind of matter-of-fact tone used for reading a grocery list.