Flanagan, 18, made seven appearances at the end of the 2010-11 season after being given a chance by manager Kenny Dalglish.
And Liverpool director of football Damien Comolli is confident the full-back will justify the faith shown in him.
Comolli told liverpoolfc.tv: "The first thing everyone will say is he deserves it because he did so well for us towards the end of last season.
"Flanno had a long time left on his current deal but we felt it was the right thing to do, to reward him for what he's done.
"His attitude is absolutely terrific. As you see him on the pitch - committed, dedicated, the intensity of his game - is what he's like off the pitch. He's very professional, he knows how to look after himself and who to listen to, and I think that's why he's improved so quickly.
"He's only 18 years old and he's still got so much room for improvement in every area of his game - but he's already very good going forward, technically he's very sound. I'm sure in two years' time we'll talk about him having made even bigger progress.
"We're really looking forward to his development and seeing how he's going to do."