Mark Cavendish won a sprint finish from Italian Elia Viviani on the cobbled High Street of Guildford in the penultimate stage of the Tour of Britain.

The British national champion kicked for the line early and looked as though he might pay the price as Viviani burst forward from fourth place.

The Cannondale rider drew alongside and even marginally ahead in the final metres but a second push from Cavendish earned him the victory for Omega Pharma-Quick Step after a 155km run from the racecourse at Epsom.

Team Sky's Bradley Wiggins was safely across the line in the pack to retain his overall lead going into Sunday's final stage to central London, which is again expected to end in a sprint finish.

Of the Irish, Sam Bennett of the An Post team finished 10th, while Dan Martin of Garmin Sharp was 47th.

Wiggins, seeking a first victory in his home tour, is 26 seconds ahead of IAM Cycling's Martin Elmiger, the Swiss taking six seconds out of his advantage in Saturday's stage, with Simon Yates third, 66 seconds back, following his victory on Dartmoor on Friday.

Cavendish won on the streets of Guildford last year but admitted that experience almost hindered rather than helped today.

"I just mis-timed it a little bit," he told ITV4.

"I was maybe over-confident. I remembered last year kicking out on the cobbles and I thought I'd do the same but maybe I didn't get it right.

"I saw (Viviani) coming and just moved across to put him on the rough part of the road.

"The second kick really takes so much out of me so we'll have to see about tomorrow."