The Reds announced the news on Friday, and Flanagan gave his thoughts on the new deal:
“It’s brilliant – it’s something I’ve always wanted to do since I was a child.
“I think this is my third professional contract with Liverpool now, so I’m really happy.
“I’ve been through a lot in the last two years with the injury, and maybe a few people thought my future was in doubt, but I’ve worked hard and this is a bonus at the end of it.”
The defender's previous deal was set to expire in the summer, but his long-term future at Anfield has now been secured.