The N.F.L. player Aaron Hernandez, who was charged with murder Wednesday, is also being investigated as the possible gunman in a double homicide in Boston in 2012, according to a law enforcement official. A second law enforcement official confirmed that Hernandez had been connected to the homicides, which occurred after a fight in a Boston nightclub.

The twin killing at a city intersection early one morning last July remains unsolved. The police knew that Hernandez had been in the nightclub, Cure, that night but considered his presence of no significance.

“They knew he was in there,” the official, who spoke on condition of anonymity because the investigation was continuing, said of the club. “But it was thought that he was just a sports star at the bar.”

When Hernandez was linked last week to the killing of Odin Lloyd, a 27-year-old Boston semiprofessional football player, the Boston police decided to take another look at his possible role in last year’s killings.