Imam-ul-Haq scored a superb century on debut and Hasan Ali made history with a five-wicket haul as Pakistan thrashed Sri Lanka by seven wickets in Abu Dhabi to win the one-day international series with two matches to spare.

Opener Imam played an innings his uncle, former captain and current chairman of selectors Inzamam-ul-Haq, would have been proud of with 100 off 125 balls after sorry Sri Lanka collapsed from 102-1 to 208 all out on Wednesday.

Hasan (5-34) broke the record for the fewest number of ODIs needed by a Pakistan bowler to take 50 wickets in his 24th match after the in-form Upul Tharanga top scored with 61 in a Sri Lanka innings that fell apart, but it was very much Imam's day.

The 21-year-old, preferred to Ahmed Shehzad, was given reprieves by Niroshan Dickwella on 29 and 89 and took advantage as Sri Lanka suffered a 10th successive ODI defeat to go 3-0 down.

Captain Tharanga made an unbeaten century in the second ODI and carried on where he left off at Sheikh Zayed Stadium with some elegant drives in an opening stand of 59 with Dickwella.

Hasan got the breakthrough when he bowled the dangerous Dickwella (18) with one that kept low and Dinesh Chandimal was trapped leg before by a Shadab Khan googly after making only 19 from 49 balls.

Tharanga got bogged down and, although the skipper brought up another half-century, he threw it away by pulling Shadab to Fakhar Zaman and Hasan claimed another two quick wickets after the spinners exerted the pressure.

Thisara Perera added a 37-ball 38, but Hasan claimed his third five-wicket ODI haul as the Sri Lanka innings fell to pieces.

Imam eased the nerves early in Pakistan's run chase with back-to-back boundaries off Lahiru Gamage and struck the same bowler for six over backward point before Dickwella put the left-hander down after he feathered Akila Dananjaya behind.

Jeffrey Vandersay ended a 78-run opening stand when Fakhar (29) gave him the charge and was stumped and Babar Azam (30) missed out on a third consecutive hundred by playing on to a wide delivery from Gamage.

The composed Imam reached his half-century off 67 balls and continued to look comfortable before trudging off in fury after edging Dushmantha Chameera behind 11 short of a hundred, only to be called back as Dickwella failed to take the catch cleanly.

Imam cashed in by becoming only the second Pakistan player to score a century on his ODI debut with a pull to square leg for a single but was finally caught by Dickwella off Perera two balls later, so it was left to Mohammad Hafeez (34 not out) to score the winning runs with 45 balls to spare.