Police have identified the suspect in a shooting at a high school ice hockey game in Rhode Island that killed two people and injured three others.

Pawtucket Police Chief Tina Goncalves said Robert Dorgan, who also used the name Roberta and the surname Esposito, died of an apparent self-inflicted gunshot wound inside the Dennis M Lynch Arena on Sunday.

"It appears that this was a targeted event, that it may be a family dispute," Goncalves said. She did not provide details about the identity of the victims.

Video of the incident showed shots were fired while players were on the rink, sparking panic as the teams scrambled to leave the arena.

Goncalves said a bystander "stepped in and interjected" and "that's probably what led to a swift end of this tragic event".