Officials say an officer was in the area of R Street and 15th Street around 11:45 pm when he saw a fight between two men.
As the officer approached them, he saw one of the men running away. He chased after the suspect, 26-year-old James McRae, and detained him.
More officers were called to where the fight occurred, and they found a 40-year-old man who had been stabbed in the chest. The man was pronounced dead at the scene.
McRae was arrested for homicide, and he was booked into the Merced County Jail.
Detectives haven't determined a motive for the attack.