It was the first time that Sagan had beaten Cavendish in a head to head sprint, but the Manxman showed that he is on form by surviving the fast pace the Cannondale Pro Cycling Team set on the final climb.
His Omega Pharma-Quick Step squad also bounced back after under performing on stage two, dragging Cavendish up into position in the final kilometre after risking a late crash.
"I think we can take a lot of good stuff from today," Cavendish said despite being unhappy about losing.
"It was a difficult climb to be fair. Cannondale went hard and I lost a lot of position, I was just happy to hang on. The team went well considering the conditions and we can be happy with how it went, though obviously not the result."
Cavendish explained that Tom Slagter (Blanco Pro Cycling) disrupted the Omega Pharma-Quick Step train as they tried to move up to contest the sprint.
"The guys stayed with me and did an incredible job, just like yesterday. I think it was misinterpreted that there wasn't 100 per cent commitment. There was and I was in a lot better position today," he explained.
"Gert (Steegmans) brought me up in the last 500 metres. I tried to get on Greipel's wheel but Peter did a really good job of fighting me back for it, so I went on his wheel. But the road was narrow, just seven metres, and so if you don’t your sprint early, then you're behind. We were already spinning out with the speed we were going. I gambled and stayed behind but I ran out of metres to come past Peter. He did it perfect."
Cavendish was happy to praise Sagan for his winning ride but refuted the idea that the young Slovakian should be defined as a sprinter.
"No. Absolutely not. He's not a sprinter," he said with a scowl, before his anger turned to genuine praise.
"He wins sprints but he's not a sprinter. He's definitely a once in a generation rider but he's not a sprinter. He's just good."
I can't win Milano-Sanremo
Despite the testing stage to Narni Scalo confirming his solid form, Cavendish again refused to consider himself a contender for Milano-Sanremo.
Clearly playing mind games with his rivals, the media and perhaps even himself, Cavendish is determined to avoid any pressure and expectation on his shoulders, perhaps to force the other teams to control the race and make the mistake of ignoring him.
"I'm fit, but you're hinting at Milano-Sanremo," he said. "I can't win Milano-Sanremo."