LAHORE, Pakistan (AP) — Hashim Amla smashed a half century and Thisara Perera provided an excellent finish with a 19-ball 47 as World XI defeated Pakistan by seven wickets in the second Twenty20 international on Wednesday.

"Hash (Amla) told me to stay till the last moment because we can catch up," man-of-the-match Perera said. "It's a habit for me to be in this situation."

Amla hit five fours and two sixes in his unbeaten 72 off 55 balls, but it was Perera's explosive knock which included four sixes that got World XI to the target of 175-3 in 19.5 overs.

Pakistan, which was restricted to 174-6, looked on top in the 14th over when it dismissed captain Faf du Plessis for 106-3.

But Perera took charge in the last five overs as he cut loose against Pakistan seamers Sohail Khan and Rumman Raees.

Still needing 33 runs off the last two overs, Perera and Amla took 20 off Sohail's 19th over that saw Shoaib Malik dropping the Sri Lankan left-hander's easy catch at long off.

Perera ensured World XI takes the series to the decisive game Friday when he reached victory in style by hoisting left-armer Raees over the long-on boundary.

Pakistan won the first match by 20 runs on Tuesday but struggled to contain World XI's strong batting line-up after its frontline fast bowler Hasan Ali was ruled out of Wednesday's game due to back strain.

Earlier, Pakistan's top order batsmen couldn't convert good starts after captain Sarfraz Ahmed won the toss and opted to bat first.

Left-hander Fakhar Zaman (21) hit Australian seamer Ben Cutting for three boundaries in the second over of the innings but was trapped leg before wicket by West Indies leg-spinner Samuel Badree (2-31).

Badree was one of two changes made by World XI along with England's Paul Collingwood — playing his first international since retiring in 2011.

Top-scorer Babar Zaman (45), who hit a career-best 86 in the first game on Tuesday, and Ahmed Shehzad (43) added 59 runs off 39 balls before both holed out in the deep while looking to accelerate the run rate.

Perera then accounted for the wickets of Imad Wasim (15) and dismissed captain Sarfraz Ahmed without scoring in the 19th over as Pakistan slipped to 157-5.

Pakistan's experienced batsman Malik (39) lifted the total when he hit Cutting for two sixes in his 23-ball knock.

Malik, playing in his 88th T20 international, became Pakistan's highest scorer in the format and surpassed Umar Akmal's total of 1,690 runs before he holed out off the last ball.

"We were a little sloppy today in the field," Ahmed said. "The score was good enough, but if the execution was better in defending, we would have pulled it off."