Merced police say Adrian Calderon fired several shots inside the restaurant after a fight broke out between two groups of people.
When the gunfire erupted, diners inside stepped in to stop Calderon and were able to keep him from running away until officers arrived at the chaotic scene.
"Citizens had already taken some action, detained that was involved, when we got here we secured the scene, and our victims were transported to area hospitals following the incident," said Merced Police Sgt. Chris Russell.
Investigators say Calderon shot three people, who were all transported to Mercy Medical Center. One of the victims, 38-year-old Ermilo Guijosa, has since died from his injuries.
Police say the victims were all involved in the fight and that no other bystanders in the restaurant were injured.
Detectives are now working to determine what led up to the shooting.
Calderon was transported to the hospital for treatment of injuries. He was booked into the Merced County jail on Tuesday morning.
He will be charged with one count of murder and two counts of attempted murder.
Anyone with information is asked to call the Merced Police Department at 209-388-7712.