The Egypt international had entered the final year of his existing contract after negotiations over extending his stay dragged on for most of last season.
The 30-year-old forward's wage demands had been a stumbling block, but a delegation flew out to meet with the player, who is still currently on holiday in the Mediterranean, and came to an agreement which reportedly makes the forward the highest-paid player in the club's history.
“I feel great and (I am) excited to win trophies with the club. It's a happy day for everyone,” Salah told the club's website.
“It takes a little bit of time, I think, to renew, but now everything is done so we just need to focus on what's next. I think you can see in the last five or six years the team was always going (upwards)."
Salah has scored 156 goals in 254 appearances for the club since arriving in 2017 and has helped it win the Premier League, Champions League, Club World Cup, FA Cup and League Cup during that time.
“If I look back to that time when I came (here), the club were not winning many things but I think I told you I had come (here) to win trophies," Salah said.
“I think we have won good trophies together and I think we can do it again."
Liverpool won the FA Cup and League cup last season but finished second to Manchester City in the Premier League and lost the final of the Champions League to Real Madrid.