The show, written by Jed Mercurio about a police anti-corruption unit, will return for two stretches of six one-hour episodes.
Mercurio said: "We're profoundly grateful to the fans who not only watched Line Of Duty but also made it such a talking point, and to BBC2 for this rare and immensely flattering opportunity.
"For series three and four, I can promise two explosive new cases for AC-12, new guest stars as police officers investigated for corruption, further twists and turns from the loose ends of Series Two, and maybe even some surprise reappearances."
Fast Show star Paul Whitehouse will also be back on the channel in Nurse, which is adapted from his Radio 4 show and stars Esther Coles as a community psychiatric nurse.
Whitehouse, who wrote the show with long-term collaborator David Cummings, said: "It's a real joy to be working on Nurse for TV as well as radio, and great to be doing so with Esther Coles, David Cummings and the rest of our great team."
There will also be a second series of James Corden and Mathew Baynton's comedy thriller The Wrong Mans and a "landmark" series on women's history.
The World Made By Women will be presented by Amanda Foreman and examine of lives of women including Chinese empress Wu Zeitan and former prime minister Margaret Thatcher.
It will be accompanied by a series of documentaries examining subjects from Joan of Arc to the Women's Institute.
The channel's acting controller Adam Barker said: "These new commissions, from some of our most talented presenters, film-makers and writers, demonstrate the range and ambition we have for the channel as we look forward to the next 50 years."