Astana rider Nibali went on his own in the long climb to Chamrousse to open a 3:37 gap over Spain’s Alejandro Valverde in the overall standings.
“I wanted to control the race. It was a very long climb, I thought it would never end,” said Nibali, who is looking to complete his set of grand tour titles having won the Giro last year and the Vuelta in 2010.
“I wanted to gain time on Valverde, and I knew Porte had been dropped. Then after joining Majka and Konig, there was not much collaboration in the group so I decided to go on my own.
“It’s going to be hard again tomorrow but Porte was clearly the one I need most to drop because of his time trialling abilities.”
Final placings will be decided in the penultimate stage, a 54-km individual time trial in which Porte would have been confident of gaining ground on Nibali.
Romain Bardet is third overall in front of Thibaut Pinot despite losing 30 seconds to his fellow Frenchman in the stage, a 197.5-km trek from St Etienne, as France looks closer to having a rider on the podium in Paris for the first time since 1997.
Bardet, who holds the white jersey for the best Under-25 rider, is 4:24 off the pace with Pinot 16 seconds further back.
The riders head for their second stage in the Alps, a 177-km ride to Risoul on Saturday.
Porte, who started the day in second place overall, cracked early in the last ascent, losing over eight minutes to drop out of contention.
The Sky rider, promoted to team leader after 2013 champion Chris Froome crashed out in the first week, lost contact with the yellow jersey group 12.5km from the finish as Nibali went for his third stage win of the Tour, the second in as many hilltop finishes.
“There is no excuse, it’s not a great day,” Team Sky manager Dave Brailsford told reporters.
“We’ll all get up and get on with it.”
With Italian Michele Scarponi and Dutchman Lieuwe Westra in trouble in that climb, Nibali only had team mates Tanel Kangert and Jakob Fuglsang by his side after the first climb, but the Dane crashed in the descent.
With his left side bruised all over, Fuglsang sprayed his wounds with water before remounting his bike, although he could not rejoin the front group.
Once all the domestiques had done their work near the foot of the 18.2-km ascent to Chamrousse, FDJ.fr rider Pinot tested his rivals by upping the pace as Porte dropped out.
Poland’s Rafal Majka and Czech Leopold Konig, who took second and third place respectively, went with about 10km left.
Soon afterwards, Valverde attacked, but he was followed by Nibali and Pinot.
The Italian was too strong for Pinot and Valverde, who could not respond to his final burst.
The Frenchman and the Spaniard played mind games, while behind Bardet and American Tejay van Garderen, now fifth overall 5:19 off the pace, rode themselves into the ground to limit the damage.
Pinot showed his exasperation to Valverde, who responded with an unsportsmanlike attack, which was not enough to drop the 24-year-old French.
Vallverde, however, took fourth place in the stage by outsprinting Pinot.
“We could have gained more time on the others,” Pinot told reporters.
“Valverde told me he could not help because he was too tired and then he attacked me. I don’t understand his tactics.”
The peloton marked a minute’s silence at the start of the stage in memory of the 298 people who died on Thursday after a Malaysian Airlines jet came down in an area under rebel control in Ukraine.
Many of them were Dutch citizens and riders of the Dutch teams Belkin and Giant-Shimano wore black armdbands.
(Reporting by Julien Pretot, editing by Pritha Sarkar)