The 50th edition of the music festival will be aired during the six-year deal.
Glastonbury will be aired on the BBC for the next five festivals after the broadcaster secured the rights until 2022.
The deal to broadcast the event on television, radio and online includes the 50th edition of the festival, held at Somerset’s Worthy Farm.
Co-organiser Emily Eavis, daughter of festival founder Michael Eavis, celebrated the opportunity to continue working with the “much treasured” BBC when she announced the partnership on Monday.
She said: “We have worked closely with a fantastic team at the BBC since 1997 – it has become an integral part of what we do at Glastonbury.
“Together we have created something really special – two decades of historic live broadcast from many of the biggest names in contemporary music.”
The festival, which saw a record-breaking 18.9 million viewers tune in last year, will not take place in 2018 when the organisers hold a “fallow year” to give the farm, staff and villagers a break.
Bob Shennan, director of BBC radio and music, said: “As Glastonbury is one of the world’s leading musical celebrations, I’m delighted that the BBC will be its broadcast home until 2022, the BBC’s 100th anniversary year, bringing the magical joy of Worthy Farm to everyone, whether at home or on the move.”
This year’s festival, to be held in June, will be headlined by Ed Sheeran, Radiohead and the Foo Fighters.