Pakistan signed off its cricket tour of England with a five-run win in their third and final Twenty20 international to draw the series 1-1 on Tuesday, with veteran batsman Mohammad Hafeez setting up victory with a 52-ball 86.

The 39-year-old Hafeez tied his best T20 score — in his 94th match in the format — to help Pakistan to 190-4 after being put into bat. Key to the innings was Hafeez’s 100-run partnership for the third wicket with 19-year-old Haider Ali, who hit 54 on his T20 debut.

Moeen Ali starred in England’s reply with 61 off 33 balls, but was one of two wickets to fall in a superb next-to-last over bowled by Wahab Riaz (2-26).

Pakistan's Haider Ali raises his bat to celebrate scoring fifty runs during the third Twenty20 cricket match between England and Pakistan, at Old Trafford in Manchester, England, Tuesday, Sept. 1, 2020. (Mike HewittPool via AP)

Pakistan's Haider Ali raises his bat to celebrate scoring fifty runs during the third Twenty20 cricket match between England and Pakistan, at Old Trafford in Manchester, England, Tuesday, Sept. 1, 2020. (Mike HewittPool via AP)

England needed 12 off the final two balls and although Tom Curran struck a six off the first, he swung and missed off the last delivery of the innings by Haris Rauf to leave the hosts on 185-8.

It was Pakistan’s first win of the tour in its last game and gives the team something to show from a month-long trip which its players spent in an isolated environment, mostly in a hotel.

Pakistan lost a weather-hit test series 1-0.

England's Moeen Ali bats during the third Twenty20 cricket match between England and Pakistan, at Old Trafford in Manchester, England, Tuesday, Sept. 1, 2020. (AP PhotoJon Super, Pool)

England's Moeen Ali bats during the third Twenty20 cricket match between England and Pakistan, at Old Trafford in Manchester, England, Tuesday, Sept. 1, 2020. (AP PhotoJon Super, Pool)

More AP sports: https://apnews.com/apf-sports and https://twitter.com/AP_Sports

Pakistan's Wahab Riaz, third right, and teammates celebrate the dismissal of England's Moeen Ali during the third Twenty20 cricket match between England and Pakistan, at Old Trafford in Manchester, England, Tuesday, Sept. 1, 2020. (AP PhotoJon Super, Pool)

Pakistan's Wahab Riaz, third right, and teammates celebrate the dismissal of England's Moeen Ali during the third Twenty20 cricket match between England and Pakistan, at Old Trafford in Manchester, England, Tuesday, Sept. 1, 2020. (AP PhotoJon Super, Pool)

Pakistan's Wahab Riaz, second right, celebrates with captain Babar Azam, second left, the dismissal of England's Moeen Ali, far left, during the third Twenty20 cricket match between England and Pakistan, at Old Trafford in Manchester, England, Tuesday, Sept. 1, 2020. (Mike HewittPool via AP)

Pakistan's Wahab Riaz, second right, celebrates with captain Babar Azam, second left, the dismissal of England's Moeen Ali, far left, during the third Twenty20 cricket match between England and Pakistan, at Old Trafford in Manchester, England, Tuesday, Sept. 1, 2020. (Mike HewittPool via AP)