A New York man was arrested after stabbing his brother to death while he was playing video games Friday, officials said.

Robert Rivera, 19, walked into the bedroom of his Brentwood home where his brother Brian Castillo, 17, was playing video games and stabbed him at least once in the neck with a knife, Assistant District Lawrence Opisso said.

Rivera was charged with second-degree murder, Suffolk County police said.

Castillo went to the front yard after he was stabbed and told his father “look what Robert did to me,” Opisso said, according to Newsday. Castillo then collapsed and died in the front yard, police said.

Rivera fled the scene, but was found 20 minutes later walking along the Sagitkos State Parkway, prosecutors said. Rivera reportedly gave a taped confession of the murder.

Steve Fondulis, Rivera’s court-appointed attorney, told the newspaper his client has a history of mental illness and needs medication.

Police were speaking to the family about Rivera’s background and possible motive, Suffolk County police Homicide Det. Lt. Kevin Beyrer told Newsday.

Rivera is due in court on Aug. 30.