Olympic champion Greg van Avermaet claimed the 2018 Tour de Yorkshire title after Stephane Rossetto rode to a sensational solo victory in Leeds.
Rossetto won by 34 seconds after riding the final 120km on his own.
Belgian Van Avermaet, who started the day 10 seconds behind overnight leader Magnus Cort Nielsen, finished second on the last stage to take the blue jersey.
He won the title by nine seconds from Spanish rider Eduard Prades with 2017 champion Serge Pauwels third overall.
Ian Bibby took third on the final stage to finish as the best British rider in sixth, 23 seconds adrift.
BMC Racing's Van Avermaet was among the pre-race favourites and he lived up to his billing after a terrific ride on the final day by his team-mates helped drop Nielsen on the race's final climb.
Van Avermaet, accompanied by three team-mates, then pressed on and he won the sprint for second, 34 seconds behind Rossetto, but crucially ahead of Prades and Pauwels to collect six bonus seconds.
Rossetto takes incredible win
The stage from Halifax to Leeds had been described as the 'Yorkshire Terrier' by race organisers and it certainly lived up to its billing with Rossetto finally emerging in a break after a flurry of early attacks.
The Frenchman was joined by Britain's Max Stedman and Connor Swift, however the latter was soon dropped and the former followed just before the fourth of the day's six short but steep categorised climbs that punctuated the 189.5km race.
That left Rossetto with a little over 120km to ride on his own, most of it through the Yorkshire Dales, but he had built up a lead of about nine minutes over the group containing Van Avermaet, Nielsen and the other race favourites, although there was a chasing group of 13 in the middle.
With each passing hill his advantage dwindled but he reached the outskirts of Leeds with a lead of about 90 seconds which proved enough and he was able to acknowledge the huge crowds that had gathered at the finish line.
"This is my third professional win and certainly my most beautiful," said Rossetto.
"I did it on a race that is growing in stature all the time, has more history now, and an amazing crowd. It's been like riding the Tour de France over the last four days."
Yorkshire delivers yet again
It was a fitting finale to an enthralling four days of racing around Yorkshire as the race born out of the county hosting the 2014 Tour de France continues to grow in popularity.
This year's race was expanded from three to four days - the women's race doubled to two - and the challenging nature of each stage has delivered unpredictable and exciting racing, if not an unexpected overall result.
Stage one was supposed to end in a bunch sprint, with Mark Cavendish earmarking it as one he could win, but a breakaway stayed clear and Harry Tanfield was victorious, while stage two's summit finish on Ilkley Moor provided much drama with the lead changing hands several times.
Scarborough's North Shore is becoming a traditional stage finish and Saturday's penultimate stage almost saw another breakaway win, while Sunday's brutal finale was as gruelling as stages get.
Hundreds of thousands of fans lined the route each day and their enthusiasm led to Van Avermaet, who has won several of the sport's biggest one-day races, including Paris-Roubaix, to say: "It was a great atmosphere and I'm happy to have this victory on my palmares.
"The parcours was fantastic as well with a lot of variation over the four stages and this race definitely deserves its place on the calendar. I hope to come back and defend my title next year."
He dedicated the victory to the late Andy Rihs, the BMC team owner who died at the age of 75 last month.
"I think we all had it in mind to win a race for him," he said. "Tomorrow is his funeral. He was a big boss for us, a big supporter for many years at BMC.
"The work the team did was incredible and we all had him in mind and it was really great I could finish it off.
"Thank you to Andy, thank you to the team."
Stage four result:
1. Stephane Rossetto (Fra/Cofidis)
2. Greg van Avermaet (Bel/BMC Racing) +34secs
3. Ian Bibby (GB/JLT Condor) Same time
4. Edward Dunbar (Ire/Aqua Blue Sport)
5. Eduard Prades (Spa/Euskaltel-Murias)
General classification after final stage:
1. Greg van Avermaet (Bel/BMC Racing) 16hrs 38mins
2. Eduard Prades (Spa/Euskaltel-Murias) +09secs
3. Serge Pauwels (Bel/Dimension Data) +14secs
4. Robert Kiserlovski (Cro/Katusha) +19secs
5. Michael Storer (Aus/Sunweb) Same time
6. Ian Bibby (GB/JLT Condor) +23secs