SALINA, N.Y. -- Onondaga County sheriff’s detectives say they’ve arrested a man who shot three people and injured a fourth person early Sunday at Denny’s restaurant in Salina.

Justus Holmes, 24, of Syracuse, had been arguing with his ex-girlfriend prior to the shooting, sheriff’s spokesman Sgt. Jon Seeber said Sunday evening.

The ex-girlfriend was with a group of people at Denny’s, at 201 Lawrence Road E., when Holmes walked in with a gun at about 4 a.m. and started shooting, Seeber said.

Holmes first shot a man before opening fire on a group of patrons and employees, Seeber said.

“Detectives say the motive appears to be domestic related as Holmes had been arguing with his ex-girlfriend, who was among the group of people inside the Denny’s restaurant,” Seeber said in a news release.

Holmes, of 220 Kenwick Drive, Syracuse, was charged with:

Second-degree attempted murder

First-degree assault

Second-degree assault

Second-degree menacing

First-degree criminal use of a firearm

Holmes is accused of injuring at least four people. The sheriff’s office has not yet released the names of those injured.

Two shooting victims were taken to Upstate University Hospital in Syracuse, where they were treated for non-life threatening injuries, Seeber said.

A third shooting victim was treated at the scene for an arm injury.

The fourth person injured was transported to Upstate University Hospital for a non-shooting related injury, Seeber said.

Holmes is scheduled to be arraigned Sunday night in the Centralized Arraignment Court in Syracuse.