In a bid to remain sober, Diana Ross has turned to severely ill comic Richard Pryor for guidance.

A meeting between the two stars was set up by Pryor’s daughter Rain, and by all accounts it was a success. But an insider quipped:

“Going to Richard Pryor for drug advice is like asking the captain of the Titanic for sailing lessons!”

Earlier this year the 58-year-old Motown legend checked herself into the Promises rehab center in Malibu to beat an addiction to booze and drugs — and recently she decided she needed reinforcement.

“Diana reached out to Richard because she thought who better to understand her substance struggles than him,” said the insider, who’s close to both stars.

“In the days before he was stricken with multiple sclerosis, there was no bigger substance abuser in Hollywood than Richard Pryor.

“Diana and Richard are longtime friends. They worked together in ‘Lady Sings the Blues’ as well as ‘The Wiz.’ And Diana was there for Richard years back when he accidentally set himself on fire while freebasing cocaine.”

Pryor’s 33-year-old daughter Rain — a drug counselor who’s won her own substance-abuse battle — “knows firsthand how hard it is to beat addiction problems,” said the insider. “So when she recently ran into Diana she suggested that her father might be able to aid in her recovery.

“Even though Richard is severely handicapped by MS, his mind is sharp. And visits from old friends, like Diana, are a special treat because he’s shut in except for brief outings and visits to his doctor.

“Seeing Richard lying in a hospital bed at home — hooked to a feeding tube and struggling to speak — was a reality check for Diana. If anything could keep her sober, it was that sight.

“Richard, with the help of Rain, told Diana that he was in the state he’s in because of drugs. He explained that drugs had ruined his body’s natural immune system and his ability to fight off disease. When the MS hit, he had no resistance to ward it off.

“Diana listened intently to what Richard was telling her.

“Rain told a friend, ‘My father is uplifted when he can impact someone else’s life in a positive way. And Diana was inspired that she had cheered up Dad.’

“Now Diana has vowed to return to Richard’s bedside the next time she’s tempted to reach for a pill or a drink. She is sincere about remaining sober.”

Rain confirmed she arranged the heartwarming meeting between the singer and her 61-year-old dad. She told The ENQUIRER:

“I don’t feel comfortable talking about Diana’s drug recovery.

“My father and she are good friends and that was all the meeting was about. I don’t want to discuss what we talked about.”