LOS ANGELES — The son of a co-creator of the long-running PBS children’s show “Barney & Friends” was arrested on suspicion of attempted murder for shooting a neighbor in the chest, Los Angeles County sheriff’s officials said Thursday.

Patrick Leach, 27, of Malibu, was booked on suspicion of attempted murder Jan. 9 after he allegedly shot the neighbor, identified as Eric Shanks, in the chest with a large-caliber handgun, said sheriff’s spokesman Steve Whitmore.

Detective Tom Lewis told the Malibu Times that the dispute involved a “trespassing issue.”

Leach was released in lieu of $1 million bail, Whitmore said.

Unlimited Digital Access. $1 for 4 weeks.

Shanks, 49, was shot in the chest, and the round exited his shoulder, Whitmore said. He was taken to a hospital in critical condition and was expected to recover, Whitmore said.

Leach is the son of Sheryl Leach, a co-creator of “Barney & Friends,” the show about a purple dinosaur who loves children and leads them in play and song.

In one of the best-known songs, Barney sings, “I love you, you love me, we’re a happy family with a great big hug and a kiss from me to you, won’t you say you love me too!”