ROME — The Italian authorities have detained seven men in connection with a deadly nightclub stampede last year, prosecutors said Saturday, accusing them of belonging to a gang that frequented music venues and pepper-sprayed clubgoers before robbing them.

The arrests were the first in an investigation that began after the Dec. 8 stampede at the Lanterna Azzurra club in the central Italian town of Corinaldo, where a popular Italian rapper was scheduled to perform. Five teenagers and a parent were crushed to death and 197 people were injured.

“The distraction of the pepper spray was meant to make the theft easier or to make it easier for them to get away,” said Monica Garulli, chief prosecutor of the city of Ancona, whose office coordinated the investigation. Traces of pepper spray had been found inside the club, close to the exit where the stampede occurred.

“It was their modus operandi — they often used the spray,” Ms. Garulli said in a televised news conference.