The 28-year-old was nearing the end of the contract he signed following a free transfer move from Schalke in 2016, with the Reds facing the threat of losing him for nothing in 2020.
However, Jurgen Klopp has moved to tie down a player who has emerged as a key man at Anfield in the last sixth months, agreeing an extension that runs until 2024.
“It's a great feeling to be a longer part of the club. It's really just a great feeling," he told the club's official website.
“From outside, you know Liverpool is such a big club – but when you are inside, then you really get a feeling for how big the club is. In all the countries, the supporters are everywhere. It's a massive and big club that I think every player would want to play for.
“We have a young and talented team and I think every one of us is hungry. Now we've seen how it is to win something and we want to have that feeling again.
“There are a lot of things still to achieve. You never know how it will end, you just have to work hard and do the best you can do. Then we will see.
“It is an honour to be a part of the club. It makes me happy that people think I've done a good job and they want to keep me."