After the boos and the brickbats came a bouquet. Team Ineos had not enjoyed the happiest of debuts after taking over from Team Sky but they eventually secured a maiden victory here with the sprinter Chris Lawless. As he had the previous day into Scarborough, the 23-year-old from Wigan finished second on the stage but there was a different complexion to this runner-up place behind the stage winner, Greg Van Avermaet, on the Headrow; it ensured that he snatched a time bonus to give him the final win by 2sec from the Belgian.

After a scenic loop northwards from Halifax out into the Dales and back south over five rated climbs, the final kilometres witnessed a blistering duel between the Olympic champion’s CCC team and Lawless and his teammates, ably marshalled by Chris Froome, Tour winner turned road captain. Narrowly, enthrallingly, it went the way of Froome and company.

Eighteen riders had started the stage within 18sec of the overnight leader Lawless, making for a tactical stalemate until the race reached the Chevin climb at Otley with only 20 of the 175km remaining. Close to the top of the climb Froome put in a searing attack of the kind that has won him six Grand Tours – complete with the head down glances at his powermeter – and he duly ripped the lead group to shreds.

As Froome eased, his Irish teammate Eddie Dunbar sprang away to make the junction to three Frenchmen, Jonathan Hivert, Arnaud Courteille and Victor Lelay, who were the last remnants of an earlier escape. As they descended towards Leeds, with Dunbar a few hundred metres ahead and seemingly riding to the overall victory, Lawless and Froome were able to mark Van Avermaet when he put his teammates Serge Pauwels and Nathan Van Hooydonck to work to close the gap.

Van Avermaet made what he hoped would be the race-winning attack ona short rise 5km from the finish, sprinting clear of the chasers, but Lawless was equal to the task of holding him even though he had struggled over the Chevin climb. When the pair linked up to Dunbar – who had burnt off his three tiring French companions – that to all intents sealed matters. “I knew that, if Van Avermaet won and I finished second, the time bonuses would mean that I won overall,” Lawless said. “So I told Eddie to ride hard at the front.”

With Dunbar to make the pace even though Van Avermaet was unwilling to contribute too much, and Lawless marking the Belgian, the trio remained just ahead of a chasing quartet that included the previous day’s victor, Alexander Kamp of Riwal-Readynez, and the local rider James Shaw, who rode strongly throughout for an eventual fifth overall. Without Dunbar’s assistance, Van Avermaet and Lawless most probably would have marked each other, the chasers would have closed and the final picture would have been far more complex.

“If someone had told me that I’d win this race when I was coming here I’d call them a bare-faced liar,” said Lawless, who cut his teeth with the British team JLT-Condor in 2016 and won a stage of the Tour de l’Avenir the following year before joining the team now formerly known as Team Sky.

“I didn’t think it was possible. I managed to get over Chevin without getting dropped. About halfway up it I started losing the main guys but [Owain] Doull did a really good job of getting me back over Chevin. When Greg went I knew we already had Eddie up the road so I knew I just had to follow him.”

Lawless’s usual team leader Froome finished 13th overall after four days in cold conditions which did not suit him. But with his eyes on a fifth Tour de France win in July he had no issues with acting as a high-class team helper.

“Putting Eddie there left us in a great position and Chris was best placed,” said Froome. “My form is getting better and better, there’s a long way to go and I have some hard work ahead of me. It was just great to have those numbers up front.”