After covering the attacks of others, Team Sky's Welsh leader only launched an acceleration of his own in the final few hundred metres, grabbing bonus seconds ahead of rival Tom Dumoulin (Sunweb) and leaving behind others including star team-mate Chris Froome.
"I didn't want to risk anything, which was why I left it as late as possible," Thomas said after the 65km stage that ended with the 16km climb.
"Especially at altitude, as soon as you kick and go deep for five seconds, it can bite you in the arse. So I didn't want to risk anything. It was about just leaving it as late as possible and then going for the line and trying to get the seconds."
Thomas now leads Dumoulin in second place by 1-59 minutes and Froome in third by 2-31. Nairo Quintana (Movistar) and Daniel Martin (UAE-Team Emirates) shot free earlier in the climb with the former winning 28 seconds ahead of Martin.
Thomas zipped ahead of rivals Dumoulin, second overall, and Primoz Roglic (LottoNL-Jumbo), fourth, in the closing 200 metres. He gapped them by five second and took the four second time bonus – a total of nine seconds.
"It was a tough start to the climb, and everyone was on the limit. But as the climb went on I was feeling better and better. Obviously Wout [Poels] and Egan [Bernal] did a tremendous job, and the whole team as always," Thomas added.
"I was able to follow Roglic and Dumoulin then I felt good in the last 200 metres and for the bonus seconds. There was still third place up for grabs and I had a little gap as well, so that was a nice bonus."
Roglic and Dumoulin each tried moves further down on the climb. Froome marked an early move by Roglic, which Dumoulin pulled back.
Froome, however, began to struggle at six kilometres out and fell behind at three kilometres. He slipped from second to third overall. That, and Thomas's ride, signalled Sky's true leader heading into the remaining four stages.
"Froomey said on the radio maybe with four or five kilometres to go that he wasn't feeling super and that gave me confidence. Because if Froomey was suffering, everyone was suffering. And I was feeling good," Thomas continued.
"Obviously I didn't want him to have a bad day, like he did. It just gave me confidence, that someone of his stature was struggling.
"It shows we're honest with each other and open. If Froome says he's feeling bad it was more to tell Egan to slow down. Fair play to Egan. I'd put a lot of money on him winning this bike race one day because as soon as the road goes up he is in his natural habitat. He's so strong.
"With regards to me and Froomey, we've just been open and honest with each other from the start. Maybe it's hard to believe sometimes after things with him and Brad [Wiggins, at the 2012 Tour de France]. But we genuinely are good mates and honest and open. I think that's the main reason for our success so far at this Tour."
Two important tests remain for Thomas: a big Pyrenean stage on Friday, which finishes with a descent, and a time trial stage Saturday in Espelette.
"I think I am in a good position now. But I am not going to change my approach. As soon as you start getting carried away that's when it goes downhill," Thomas said.
"Yeah definitely," he added when asked if he's stronger than ever before in a Grand Tour. "It's the first time I have ridden for GC in the Tour. I am feeling good but I am not going to get carried away, keep fuelling and eating and drinking as best as I can and just not let any complacency creep in."
Thank you for reading 20 articles this month* Join now for unlimited access
Enjoy your first month for just £1 / $1 / €1
*Read 5 free articles per month without a subscription
Join now for unlimited access
Try first month for just £1 / $1 / €1