Briton Ian Stannard produced a brilliant solo ride to win the penultimate stage of the Tour of Britain in Nottinghamshire.

The 31-year-old Team Sky rider escaped from a breakaway group with 16 kilometres to go and finished 59 seconds ahead of Germany's Nils Politt, with Italian Giovanni Carboni three minutes and nine seconds behind in third.

Fellow Briton Mark McNally came home fourth, while France's Julian Alaphilippe retained the overall lead, with a 17-second advantage over Holland's Wout Poels and Slovenia's Primoz Roglic in third.

Stannard was the catalyst for a five-man breakaway just 20 kilometres into the seventh stage, the longest stage of the race, 215 kilometres from West Bridgford to Mansfield.

Politt also turned in a gutsy ride to finish a clear second, but he was dropped by Stannard with 16 kilometres to go and could do little as the Englishman stretched his lead all the way to the finish.

Latvia's Emils Liepins won the bunch sprint for fifth place, with the peloton crossing the finish line around four minutes behind Stannard.

Quick-Step Floors rider Alaphilippe will bid to hold on to his advantage on Sunday when the final stage starts and finishes on Regent Street in London.