The fourth stage started in Hanley in Stoke On Trent at the Potteries Museum and Art Gallery,and was a leg breaker of a 188.4km stage through North Wales to Llanberis.
Michael James Northey (Node 4-Giordana Racing), Iljo Keisse (Omega Pharma-QuickStep), Heinrich Haussler (IAM Cycling), Marco Canola (Bardiani Valvole-CSF Inox), Anthony Delaplace (Sojasun), Angel Madrazo (Movistar), Alistair Slater (Great Britain), Aaron Gate (An Post-Chainreaction), Ian Wilkinson (UK Youth), Matthias Krizek (Cannondale), Thomas Scully (Team Raleigh), got away after sixteen kilometres and gained a maximum advantage of 3:25.
With Aaron Gate moving into lead in the sprint competition, King of the Mountains leader Angel Madrazo (MOV) took the maximum points on the first climb of the day at Groes and took the second climb ahead of Delaplace at Llansanna.
With forty kilometres to go, Team Sky were on the front in the sunshine working for race leader Sir Bradley Wiggins, some 1.48 behind the escapers, which included Slater who was 2.15 down on Wiggins.
The gap went out to just under two minutes with 17kms to go as the race headed into the Snowdonia area.
The final climb was not on Snowdon, it was the category 3 Pen y Pass which was just 8 kilometres from the finish line in Llanberis.
Back in the peloton and Dan Martin attacked followed by Nairo Quintana and Wiggins whilst Delaplace took the maximum points from Madrazo from Northey on the final climb.
Jack Bauer, having been set up by Martin went after the escapers who were 44 seconds ahead.
Michael Northey went clear with four kilometres remaining from the other ten, who were now being eyed by the peloton lead by Ian Stannard.
The Node 4 rider was caught with 2.4kms to go and Omega Pharma Quick Step's Iljo Keisse attacked before Heinrich Haussler came back to control the escape.
Scully piled on the pressure at the front but Net App Endura caught up to the escapers with 1.5kms to go.
Inside the last 500 metres and Mark Cavendish was in a great position and took the win in 4.45.33 ahead of Viviani the points leader,Van hoff, Pelucchi and Rojas.
Cavendish said of his eighth Tour Of Britain win: "Petacchi brought me up, taking me up the side of the bunch before I jumped on Bardiani and IAM trains.
"The guys knew i was there. It was a fast finish and I'm really happy today. "I thought it was my day with 2km to go and it made it quite dangerous catching eleven riders inside the final two kilometres and it broke up the sprint trains