At 3:20 a.m. on Sunday, the four young adults found themselves at the same busy Waffle House in Nashville. One was a talented musician and another worked at an appliance store. There was a college student who was about to graduate, and a longtime Waffle House employee.

Moments later, they were dead after a man armed with an AR-15 opened fire on the restaurant from outside and then made his way in. The police said on Monday that they had arrested the gunman, Travis J. Reinking, 29, after a manhunt that spanned neighborhoods southeast of Nashville. Four people were also injured in the rampage.

[Read about the hunt for the suspect.]

Friends and relatives of the victims were still trying to make sense of the tragedy on Monday. Here is a look at their lives.

Joe R. Perez, 20

Mr. Perez grew up in Buda, Tex., just outside of Austin. After graduating from Hays High School in 2016, he moved to Nashville to work with one of his two older brothers in an appliance store. His mother, Patricia, said that she had last spoken to him on Saturday night.