Fahim Ashraf, right, guided Pakistan to victory when it looked like Bangladesh had done enough to win ©Getty Images

Pakistan defeated neighbours Bangladesh by two wickets in the second warm-up match of the International Cricket Council (ICC) Champions Trophy.

They chased down a target of 342 to secure victory at Edgbaston in Birmingham after Tamim Iqbal looked to have set up victory for Bangladesh with a century.

However, a quickfire half century from Fahim Ashraf in a ninth wicket stand of 93 guided Pakistan to success with three balls to spare.

Opener batsman Iqbal’s 102 came off 93 balls and featured nine fours and four sixes.

The next best contribution to Bangladesh’s score of 341-9 came from Imrul Kayes, who hit 61 off 62 balls.

Junaid Khan was the pick of the bowlers for Pakistan as he picked up four wickets for 73 runs from nine overs.

Tamim Iqbal scored 102 for Bangladesh at Edgbaston ©Getty Images
Tamim Iqbal scored 102 for Bangladesh at Edgbaston ©Getty Images

In reply, Pakistan made a stuttering start to their innings as they lost Azhar Ali and Babar Azam cheaply inside the first five overs.

They soon picked up the pace though and thanks to a knock of 79 from Shoaib Malik, batting at number five, assisted them.

However, wickets were still being lost regularly and with 7.2 overs left, Pakistan were eight down and still needing 93 to win.

But a fantastic 64 from just 30 balls from Ashraf saw a remarkable turnaround as he struck four fours and just as many sixes in a partnership with Hasan Ali, who scored 27 off 15, seeing the side home.

The ICC Champions Trophy officially gets under way on June 1.