Just before his death, Michael Jackson told a record producer that he was terrified he’d be murdered!

“He mentioned it to me a few times…like people were out to kill him…and he would say names, saying these are the people who are trying to kill me,” said Teddy Riley, Jackson’s close friend and his former producer.

Riley’s friendship with the Gloved One dates back to 1991, when he co-produced half the songs on Jackson’s hit album “Dangerous,” including the hits “Remember the Time,” “Jam,” and “In the Closet.”

Their working relationship continued with Jackson’s “HIStory” and “Invincible” albums.

No one was happier than Riley that Jackson was set to make a comeback with 50 new concerts this year.

Riley saw the performer two days before his death on June 25 and said the singer was “in great health.”

When Jackson died, Riley said he immediately called some of the singer’s family members. “I said, ‘Listen, he was murdered.’”

Riley believes that “somebody didn’t like something Jackson said or something he’s doing or didn’t want him to go to the top, so they had to get rid of him. We’ve got so many people we think it could be. It’s going to come out. You’re going to find out.”

The Los Angeles County coroner has ruled Jackson’s death a homicide, saying “acute intoxication” from the powerful sedative propofol was the primary cause of death. His body also contained five other prescription drugs.

A police investigation into Jackson’s death is continuing and it has focused on Jackson’s physician, Dr. Conrad Murray, who was with the singer at the time of his death.

Murray has told authorities that he had been giving Jackson propofol nightly for six weeks to treat chronic insomnia.