Mitchelton-Scott rider Matteo Trentin of Italy. Photo: Gonzalo Fuentes/Reuters

LONDON  Italian Matteo Trentin snatched victory on the second stage of the Tour of Britain and the overall lead on Sunday as home rider Alex Dowsett's bid for glory fell just short.

After a day riding around the Scottish borders Dowsett (Katusha-Alpecin) attacked with 3km of the stage remaining but was overhauled 100m from the line in Kelso, Scotland as Trentin (Mitchelton-Scott) stormed through in a thrilling sprint finish.

Jasper De Buyst (Lotto-Soudal) finished second with Mike Teunissen (Jumbo-Visma) third. Dowsett ended in seventh spot.

Dutchman Dylan Groenewegen (Jumbo-Visma) was caught on the wrong side of a split in the peloton with 30km remaining and lost time. Trentin now leads by 11 seconds overall from Davide Cimolai (Israel Cycling Academy).

"We worked so hard for that," Trentin said. "First to get rid of Groenewegen and then to prevent him coming back."

The Tour of Britain ends in London on Saturday.