The centre-back put pen to paper on the deal at Melwood on Friday morning to commit his future to the Reds.
Lovren is approaching the end of his third season with the club, having signed from Southampton in July 2014. He has since clocked up 105 appearances in all competitions, scoring four goals.
Moments after inking the new contract, he told Liverpoolfc.com: “I think this is one special day for me and my family.
“I think I am the happiest guy [in the world] today, it’s another dream come true. It was always my dream to stay as long as possible at one club that I love – and that is Liverpool.
“After all that happened in the beginning, in the last two seasons I think I’ve done better than in the first season. The club has rewarded me, they believed in me and also the fans, and this is what I respect a lot after everything that happened.
“I am pleased with everything and I just want to stay here as long as possible and be a part of this family for many, many years to come.”
Lovren has made 28 appearances for Liverpool so far in 2016-17, helping himself to two goals.
The 27-year-old has forged a strong understanding with summer signing Joel Matip, with the Reds suffering just one defeat in 15 games when they’ve played alongside each other, helping maintain the push for a top-four finish.
Lovren added: “I am glad I will be a part of this team and this plan for the future. We are a really talented team with many special players, an amazing manager, the club is fantastic [and] the supporters are always behind us even on the bad days, which is the most important thing. I am definitely excited about the future.”