On a quiet day to Matera, the race exploded in the finale with UAE Team Emirates leading the charge, trying to break the spirit of Pedersen on the hills into the town.
However, Pedersen, although visibly struggling, was able to get back to the front of the race in the final 500 metres and after good work from Czech teammate Mathias Vacek, he launched his sprint with 250 metres to go from the front.
Zambenini of Bahrain Victorious was the fastest finisher, but the line came too quickly for the Italian. Tom Pidcock finished third in the reduced sprint.
Pedersen explained: "This was an incredibly hard 20 kilometres and I suffered a lot. It was really tough and I wasn't sure (I had won).
"I had a really hard time and I used a lot of energy to move up to (Mathias) Vacek's wheel, and luckily I had enough for the win."
With his third victory of the race so far, Pedersen extended his lead in the general classification to 17 seconds over pre-race favourite Primoz Roglic because of the bonus seconds on the line, with Vacek a further seven seconds back.
He becomes just the fifth rider in the 21st century to win three stages of the opening five in a grand tour.
"I wasn't sure at all if I had won," Pedersen added.
"Three wins in five stages and winning with the pink jersey is insane."
Earlier in the day, three riders went away in the day's breakaway. The all-Italian trio, Giosue Epis, Lorenzo Milesi and Davide Bais, never got more than two-and-a-half minutes from the peloton, which was controlled by Lidl-Trek, as the riders went from Ceglie Messapica to Matera.
In the two intermediate sprints after the break had ridden through to pick up the big points, overall leader Pedersen mopped up the rest to extend his lead in the sprint classification.
With 42 kilometres to go, Bais and Milesi left Epis behind, but their effort was ultimately forlorn, caught with 13.2km to go.
The race heads to Naples on Thursday in what is expected to be a versatile sprint stage as the riders tackle a 227km slog from Potenzza.