Record books: Pakistan's Mohammad Rizwan (right) and Abdullah Shafique on their way to centuries against Sri Lanka on Tuesday
Record books: Pakistan's Mohammad Rizwan (right) and Abdullah Shafique on their way to centuries against Sri Lanka on Tuesday AFP

Mohammad Rizwan and Abdullah Shafique clubbed centuries as Pakistan chased down the highest target in World Cup history to beat Sri Lanka by six wickets in Hyderabad on Tuesday.

The diminutive Rizwan overcame leg cramps to score a 121-ball 131 not out while Shafique hit a 103-ball 113 as Pakistan overhauled their 345-run target in 48.2 overs.

The victory gives Pakistan two wins in as many games and a huge boost in confidence ahead of their high-profile clash against India in Ahmedabad on Saturday.

Sri Lanka's imposing total of 344-9 was built around brilliant hundreds from Kusal Mendis and Sadeera Samarawickrama.

Rizwan cracked eight boundaries and three sixes while Shafique's knock had ten boundaries and three sixes as Pakistan improved on the previous highest World Cup chase of 328 by Ireland against England in Bangalore in 2011.

Rizwan added a match-turning 176 run stand for the third wicket with Shafique and another 95 for the fourth with Saud Shakeel who made a 30-ball 31.

Rizwan and Shafique lifted Pakistan from a disastrous start in which they lost Imam-ul-Haq (12) and skipper Babar Azam (ten) to pacer Dilshan Madushanka.

Haq, who completed 3,000 runs in 67 innings to become the second joint fastest to the milestone, hooked into the hands of the fielder while Azam edged a flick behind the wicket.

Shafique, who replaced out-of-form Fakhar Zaman, justified his selection by reaching his maiden hundred off 97 balls.

Shafique fell in the 34th over to Matheesha Pathirana but Rizwan continued the chase, reaching his third ODI hundred off 97 balls.

He hit the winning single and raised his hands in delight.

When Sri Lanka batted, after winning the toss, Mendis smashed the fastest century for Sri Lanka in a World Cup match with a 77-ball 122, his highest score in ODIs and third century.

It was an innings spiced with 14 boundaries and half a dozen sixes, leading the charge for Sri Lanka while Samarawickrama hit an 89-ball 108 for his maiden hundred.

Samarawickrama hit 11 boundaries and two sixes.

Mendis twice escaped dropped catches -- Shaheen Shah Afridi dropped him off his own bowling in the fifth over and then Imam-ul-Haq blundered in the next over again off Shaheen on 18.

Mendis completed his 50 off 40 balls with his seventh boundary, lifting Sri Lanka from the early loss of Kusal Perera (nought) in the second over to Hasan Ali.

Mendis put on a 102 with Pathum Nissanka whose 51 came off 61 balls with seven boundaries and a six.

Once Nissanka fell to Shadab Khan, Mendis and Samarawickrama unleashed some superb hitting against Pakistan's pacers and spinners alike, adding 111 for the third wicket.

They were savage on fast bowler Haris Rauf, hitting him for two sixes and a boundary in the 21st over.

When Shaheen came back for a second spell, Mendis cracked three fours in the 25th over.

Hasan was hoisted by Mendis for a six to allow the batsman his third hundred off 65 balls.

It was his first century in three-and-a-half years but he had made 76 in the opening defeat to South Africa and now has at least five half-centuries in his last seven ODIs.

Previously, Kumar Sangakkara held the Sri Lanka World Cup record with a 70-ball hundred, scored against England in 2015.

Mendis's previous best was 119 against the West Indies in Hambantota in February 2020.

Mendis hit two sixes off Hasan's 29th over before he holed out at deep mid-wicket boundary.

Hasan then removed Charith Asalanka for one but Samarawickrama and Dhananjaya de Silva (25) added 65 for the fifth wicket.

Hasan finished as the best bowler with 4-71 while Rauf took 2-64.

In the runs: Sri Lanka's Kusal Mendis on his way to a 65-ball century against Pakistan on Tuesday
In the runs: Sri Lanka's Kusal Mendis on his way to a 65-ball century against Pakistan on Tuesday AFP