El-Hadji Diouf has advised Mo Salah to stay at Liverpool for another four years.
But the former Reds forward has warned Salah that he will not be able to earn what he is truly worth because he is African.
Egypt star Salah has just over 15 months left to run on his current contract.
Talks over a new deal have been dragging on for months, with Salah wanting £400,000 per week, according to the Daily Mail.
Real Madrid are among the clubs said to be monitoring Salah’s situation.
But ex-Senegal international Diouf, who played for Liverpool for two seasons between 2002 and 2004, believes Anfield is the best place for Salah.
“It is obvious that Liverpool must accept Salah’s demands,” Diouf told beIN Sports.
“If I were Salah, I would stay at Liverpool, he can make more money, he is the best player at the club with [Sadio] Mane, and with him they will win a lot of trophies.
“He’s 30 years old, and I’m asking him to play 4 more years with the Reds. A transfer to Real Madrid will mean he will have to start all over again.”
Although Diouf thinks the Egypt captain should stay, he added: “Salah has to realize that he is African, so they will not treat him like the Europeans, and they will not give him the best contract like the others.
“The same thing happened to me when I was at Liverpool. They told me not to go to my country to play with my national team.”
Diouf’s time at Anfield is not fondly remembered on Merseyside. He scored just six goals in 80 games, but managed to earn 21 yellow cards and one red.
The most memorable moment of his Liverpool career came in 2003 when he spat at a Celtic fan.
Former Liverpool captain Steven Gerrard briefly mentioned Diouf in his autobiography, My Story.
Gerrard wrote: “I don’t really want to waste time thinking about El-Hadji Diouf but it’s worth highlighting his wasted seasons at Liverpool as an example of how it can all go wrong.
“It seemed to me that Diouf had no real interest in football and that he cared nothing about Liverpool.”
Salah is currently on international duty with Egypt. On Tuesday he will lead out his team against Senegal at the Stade Me Abdoulaye Wade.
Egypt will go into the game with a 1-0 lead from the first leg in Cairo. The winner of the two-legged clash will qualify for the 2022 World Cup.