Drunk and angry, the three men were in the mood for violence as they walked the streets near Mill Creek Park in the middle of the night.
Sergio Mendoza just happened to have the bad luck to be in their path.
The men — Nathaniel Mayfield, 24, Steven Buckner, 19, and Timon Everidge, 18 — beat Mendoza then chased him and beat him some more when he tried to get away, according to recently filed court documents.
Everidge repeatedly stabbed the 34-year-old, the documents say. Mendoza died at the scene.
Mendoza's family has said he was the homeless man who police said in 2014 helped convince an apparently suicidal woman not to jump from the Wilson Road overpass at Highway 99, then clung to her when she slipped and held on until police arrived and pulled her to safety.
Asked for the reason behind the July 11 attack, Buckner told Bakersfield police detectives Mendoza, whom he described as unarmed and defenseless, was chosen at random. He said he felt bad about the assault afterward and went home and fell asleep.
Mayfield told investigators he'd been "extremely drunk and mad," still seething over being pushed by a girl earlier in the night. Buckner, however, said all three men were in a foul mood over a theft about which he provided no further information.
Whatever the reason, the men agreed they confronted Mendoza near the park and beat him.
At some point during the assault Mayfield noticed Mendoza had been stabbed, according to the documents. He told investigators he ran away as Mendoza cried for help, and only later returned to the scene to check if he was dead. He never summoned medical aid.
Everidge said he stabbed Mendoza because "he was in a mood to do so," an investigator wrote in the documents. He expressed no remorse.
"(Everidge) stated that he was, in a manner of speaking, mentally disturbed and had no real reason for his actions," the investigator wrote.
And despite Buckner's expression of regret, his cellphone revealed text messages between him and Everidge in which they joked about the incident and sent "laughing face" emojis to each other, according to the documents.
It's believed the assault occurred at about 2:45 a.m. Police were called around two hours later to the intersection of 19th and V streets, where they found Mendoza's shirtless body on the sidewalk.
Six puncture wounds were visible: two on his chest, one on his left bicep, two on his left tricep and one one his left forearm. He also suffered multiple injuries to his head, knees, hips, elbows and hands, according to the documents.
Witness tips provided by phone — and by an informant with another law enforcement agency who reported having second- and third-hand information related to the case — helped investigators identify the suspects, the documents say. They were arrested July 20.
Surveillance cameras did not capture the attack, but footage shows Mayfield and Buckner walking in the area at the time, the documents say.
The informant reported the men robbed Mendoza of aluminum cans during a prior confrontation, according to the documents.
Mendoza was born in Bakersfield and attended Highland High before transferring to East Bakersfield High in his freshman year, his family said. He dropped out of school his junior or senior year.
He later suffered from addiction issues and possible mental illness, the family said, and began taking nighttime walks.
Several people told police Mendoza was known to exhibit erratic behavior and randomly shout obscenities as he walked, but was considered harmless and rarely had problems with anyone, according to the documents.
Everidge, Mayfield and Buckner have each pleaded not guilty to first-degree murder and are next due in court Aug. 24.