Sky will screen live high-definition coverage of every race in the 2012 to 2018 seasons, resulting in significant savings for the BBC, which will broadcast half of them.
All races, qualifying and practice sessions will be live on Sky Sports across TV, online, mobile and tablet devices.
Half the races and qualifying sessions will be shown live on BBC, including key races such as the British Grand Prix and the Monaco Grand Prix. The final race of the season will also be broadcast on the BBC.
If there are an odd number of races in the season, the extra race will be screened exclusively on Sky Sports.
The BBC will also show extensive highlights on TV, online and mobile of all the races and qualifying sessions that it is not covering live.
Build-up coverage of each Grand Prix will be shown on BBC New, Sky Sports News and Sky News. There will also be extensive multi-platform coverage including red button, bbc.co.uk/sport and skysports.com.
In 2008, the BBC signed a five-year deal to broadcast F1 from 2009, replacing ITV, the sport's host for 12 years.
Barbara Slater, director of BBC Sport, said: "We are absolutely delighted that F1 will remain on the BBC. The sport has never been more popular, with TV audiences at a 10-year high and the BBC has always stated its commitment to the big national sporting moments.
"With this new deal, not only have we delivered significant savings, but we have also ensured that through our live and extended highlights coverage, all the action continues to be available to licence-fee payers."
Barney Francis, managing director of Sky Sports, said: "This is fantastic news for F1 fans and Sky Sports will be the only place to follow every race live and in HD.
"We will give F1 the full Sky Sports treatment with a commitment to each race never seen before on UK television."