NORTH HOLLYWOOD >> A Rialto man was in custody Thursday, a day after he allegedly stabbed a homeless man to death who had been calling him names and yelling obscenities outside a 7-Eleven store in North Hollywood, a Los Angeles police detective said.

Kurtis King, 52, was arrested by Los Angeles police in Rialto Thursday morning and was in the process of being booked on suspicion of murder at the Van Nuys Division, said LAPD Detective John Doerbecker of the Operations-Valley Bureau Homicide unit. Police said King had a prior record for receiving stolen property in the ’90s.

“According to the suspect, (the homeless man) was yelling obscenities, and it just got under his skin,” Doerbecker said.

The homeless man is John Bannan III, 41, who had been living in the North Hollywood area, he said. Police initially said the victim was believed to be in his 20s.

King, who works in the area, went into the 7-Eleven store on the northeast corner of Laurel Canyon Boulevard and Oxnard Street Wednesday morning and bought some chewing gum, Doerbecker said. When he exited, the homeless man was “calling him all kinds of names,” and shouting obscenities at him, according to the suspect’s account.

The suspect said he tried to ignore the homeless man, but when the barrage of name calling continued, he grabbed what he described as a knife from his car, “chased him down” alongside the strip mall’s storefronts and stabbed him several times, Doerbecker said.

“We’re trying to get our mind around it, exactly how this happens to an educated, elderly male — what causes him to snap?” Doerbecker said, adding the suspect claims to have a master’s degree.

The stabbing occurred about 9 a.m. Wednesday, and the victim was pronounced dead at the scene, police said.

LAPD’s Doerbecker said police have surveillance video of the brutal stabbing from 7-Eleven as well as other stores in that strip mall.

Bannan’s family said he had been homeless for years and often had outbursts of anger and engaged in yelling, according to Doerbecker.

The detective said he expects King, who was being held at the Van Nuys Jail, to be arraigned next week.