India posted a challenging 294 for seven after electing to bat and completed the win by bowling out the hosts for 274 in 45.4 overs at the Pallekele International Cricket Stadium.
India had lost the second ODI in Hambantota by nine wickets but were dominant in all the other matches.
Opener Gautam Gambhir (88), Manoj Tiwary (65) and skipper Mahendra Singh Dhoni (58) scored half-centuries while Rohit Sharma (4) failed yet again on Saturday.
Dhoni along with Pathan (29 off 28) plundered 77 runs in just 9.5 overs before falling to Lasith Malinga in the penultimate over of India innings.
Later, the pace trio of Pathan (5-60), Ashok Dinda (2-55) and Zaheer Khan (1-53) ripped apart the Sri Lankan top-order, tilting the scale in favour of India.
Courtesy this win, India have now claimed the second spot in the ODI rankings behind Australia after starting the series in the fourth position. Both India and Australia now have 119 rating points, followed by South Africa (118).
Lahiru Thirimanne, who came to bat at number three after the fall of opener Tillakaratne Dilshan (0), was the top scorer for the hosts with his fighting 81-run knock.
Run-rate was never a problem with Sri Lanka but they struggled to keep wickets in hand as half of the batting line-up was resting in pavilion within 16 overs.
Thirimanne and Jeevan Mendis (72) did stage a fightback for their side with a gritty 102-run partnership for the sixth wicket in 20.4 overs.
Thirimanne’s excellent innings met with a tragic end when he was run out in the 36th over.
Mendis kept fighting and brought his team closer to the target but once Pathan dismissed him and Thisara Perera (18) in the 43rd over, an Indian win looked very much on the cards.
It was Pathan who dealt the first two blows by removing Dilshan and Upul Tharanga (31). Before being caught by Ajinkya Rahane, Tharanga batted superbly in the company of Thirimanne as the duo put on 45 runs for the second wicket.
In a span of 30 balls, Sri Lanka lost Dinesh Chandimal (8), skipper Angelo Mathews (13) and Chamara Kapugedara (9) to be reeling at 102 for five.
Earlier, Dhoni smashed a 38-ball 58 after Gambhir and Tiwary put India on course with a 110-run partnership for the fourth wicket.
Dhoni was ruthless against the Lankan bowlers, hitting them all across the park, while bringing up his 50 off just 34 balls with a huge six over midwicket off Thisara Perara.
With his three wickets, Malinga was the pick of the bowlers for the hosts, who had rested captain Mahela Jayawardene and Rangana Herath.
Indian openers in the absence of rested Virender Sehwag, started off sedately with the first boundary of the innings coming in the fourth over — Rahane driving Parera through the covers.
Rahane, who was playing in his first match of the series, fell for just nine runs to an incoming delivery from Parera.
Gambhir along with Virat Kohli (23) combined together to add 48 runs for the second wicket before Nuwan Pradeep brought one in to the right-hander to have him trapped.
Sharma’s misery with the bat continued as he became Pradeep’s next victim — the ball angling in and moving out after pitching to take the off stump of the Mumbaikar, who was looking to play towards the leg side.
With the scoreboard reading 87 for three at the end of the 13th over, it was left to Gambhir and Tiwary to resurrect the Indian innings.
Both the batsmen played positively, dispatching anything loose coming their way. Tiwary, who was just playing in his second match of the series, in particular, was aggressive as he regularly stepped out against the Sri Lankan speedsters.
The Bengal batsman was though lucky to complete his half century, as he inside-edged an incoming ball from Perera at 46 to the wicketkeeper, but the umpire ruled him not out.
Tiwary finally brought up his 50 in style flicking Pradeep through the square-leg fence.
The 26-year-old survived another confident shout from the Lankan’s off the bowling of Sachithra Senanayake before falling prey to a short-pitched delivery from Malinga.
Sri Lankan pace spearhead Malinga got Suresh Raina in the next ball to help the hosts make a strong comeback. Gambhir was the next to go with India still having to play 11 overs. But Dhoni utilised the remaining overs to the hilt.