Serge Pauwels’ first career win counted double as the Belgian ended a long wait for victory by taking the final stage of the Tour de Yorkshire and with it the general classification.

The 33-year-old Belgian attacked off the top of the Côte de Wigtwizzle, the second of four categorised climbs in the final 22 kilometres of the 194.5km stage from Bradford to Fox Valley near Sheffield, and stayed away to cross the line just in front of his Dimension Data team-mate Omar Fraile.

“It feels a bit strange,” Pauwels said after standing on the podium in front of huge crowds gathered at the finish. “It is the first time I have had my hands in the air. But I think people would not really be surprised that I take a win because I have been quite close. Last year I was second, third, fourth, everything except a win, and now I get two wins at the same time which makes it more special.”

Having launched his attack in the final metres of the climb, Pauwels pulled clear on the following descent and built a lead of 30 seconds on the testing Côte de Ewden Height – but he would need all of it as the chasing pack came back at him on the final climb of the day out of Midhopestones.

“I could see on the climbs nobody was really able to make a difference so that’s why I tried in the descent,” he said.

He made it over the top of the final climb with an advantage of nine seconds and was unaware of that gap dropping to five seconds at one point as the team director, Roger Hammond, told him over the radio not to look back. Fortunately for Pauwels, only Fraile could bridge over and the Spaniard was not about to deny his team-mate a first victory.

“The first thing I saw was his front wheel and I recognised it as we have the same wheels,” Pauwels said. “At first I thought the whole group is there but he took over and said: ‘Come on, let’s go, it’s for you.”’

Jonathan Hivert of Direct-Energie was third, with BMC’s Brent Bookwalter fourth and the Londoner Tao Geoghegan Hart – making his debut on British roads for Team Sky – fifth.

It was a thrilling finish to a brute of a stage which took the riders over eight categorised climbs and more than 3,500m of ascending, while passing the massive crowds for which this race, only three editions old, has quickly become famous.

Key in getting Pauwels in position for the win was his team-mate, the Yorkshireman Scott Thwaites, who got to race in his home town as the stage passed through Burley in Wharfedale early in the day.

“Everybody contributed to the win and to get a one-two is really impressive,” Thwaites said. “There were a lot of dangerous teams so it was down to me to control the group and I managed to slim it down to 25 riders, which was ideal.

“It’s a great feeling to be in a massive race. I’m thankful to everyone who came and spurred me on. I had butterflies riding in front of my own village.”

A seven-man breakaway featuring Mathew Hayman, Orica-Scott’s 2016 Paris-Roubaix winner, animated the early part of the day and led the pack over the first four climbs – including the famous cobbles of Haworth and the imposing Shibden Wall, where there was barely room for more than one bike at a time as crowds mobbed the roads.

“It doesn’t get any better,” Team Sky’s Ian Stannard said of the atmosphere. “It’s on a par with the Tour de France. It’s amazing to see in a home race, the public really getting behind it. It makes you proud when you’re riding your bike.”

Numbers given to organisers by the police estimated Sunday’s crowd alone at one million fans, taking the total for the weekend of racing to 2.2 million – setting a new standard for the young race.

“I’ve ridden all around the world,” Pauwels said. “If I would make a top three of the most amazing crowds, of course you have the Belgian Classics, the Basque people who are amazing, but I think the people here in Yorkshire for sure are also top three.

“They are very enthusiastic and the roads are full. It’s incredible, something you almost never see anywhere else.”