The 27-year-old, riding for the Bouygues Telecom team, launched a stunning late assault to overtake Commesso just yards from the finish and clinch victory in the 180km stage from Montelimar to Gap.
Americans Christian Vandevelde and Christophe Moreau finished third and fourth respectively with Robbie McEwan keeping the green jersey.
Despite not winning any of the four categorised climbs, Spaniard David De la Fuente retained the polka-dot jersey.
Fedrigo said: “In the first week the team got into many breaks but didn’t last the distance. In the second week, we were a bit quiet so I wanted to go for it. I remained concentrated right to the end.”
In blistering heat in southern France, a 10-man pack emerged early in the race as Dutchman Michael Boogerd claimed victory in the first climb — with Commesso winning two of the remaining three — but it was Matthias Kessler, Egoi Martinez, Mario Aerts, Pierrick Fedrigo and Commesso who led the first serious breakaway.
Spaniard Martinez soon dropped out of the escape group to rejoin the chasing pack with Rik Verbrugghe and David Canada mounting a concerted pursuit to break clear of the peloton to form the six-strong breakaway that enjoyed a lead of nearly six minutes at the halfway point.
However, a horrendous crash involving Kessler, Verbrugghe and Canada — the latter two required hospital treatment — saw the leading pack whittled down to just three as the race entered the final climb at Col de la Sentinelle.
Canada, riding for the Saunier Duval Prodir team, suffered a suspected broken collarbone and Verbrugghe was rushed to hospital with a serious knee problem but Kessler rode on.
Commesso, Fedrigo and Aerts continued to jostle for the overall lead but the pace proved too much for Belgian Aerts as his hopes of winning the stage disappeared with 10km left.
The duo continued to keep the peloton at bay and led by barely 20 seconds with 2km remaining as Vandevelde emerged from the chasing pack to set up a tense finale.
It was Fedrigo, though, who mustered a last-gasp sprint to pip Commesso on the line.
Fedrigo’s Bouygues Telecom team-mate Laurent Lefevre told Eurosport: “The win is an immense satisfaction for the team. We have waited for this for ages and today’s stage was perhaps the last chance of victory for us on the Tour.”
Yellow jersey holder Periero admitted: “I want to keep the yellow as long as possible, nobody expected us to have it, but now we have, we’ll have to see day by day.”
Four confirmed retirements during the gruelling stage — the first in the Alps in this year’s competition — mean 156 riders will compete in tomorrow’s 187km stage to L‘Alpe d‘Huez.