(REUTERS) – All-rounder Imad Wasim’s unbeaten 49 guided Pakistan to a thrilling three-wicket victory over Afghanistan in Leeds yesterday, maintaining their hopes of reaching the World Cup semi-finals.Chasing a target of 228, Pakistan lost opener Fakhar Zaman for a duck on the second ball of the innings when he was trapped leg-before by off-spinner Mujeeb Ur Rahman.Babar Azam, who scored his maiden World Cup century in Pakistan’s win over New Zealand earlier this week, combined with Imam-ul-Haq to stabilise the innings with a steady 72-run partnership.Off-spinner Mohammad Nabi removed the pair to expose the middle order, before Mohammad Hafeez and Haris Sohail fell cheaply to leave Pakistan reeling at 142-5.Captain Sarfaraz Ahmed (18) and Shadab Khan (11) were run-out to set up an intense finale but Wasim and Wahab Riaz (15) ensured there were no further hiccups as they chased down the target with two balls to spare.“When I went in they were bowling brilliantly but I just hung in there. We wanted to bat out the 50 overs and see,” Wasim, who was named man-of-the-match, said.“Thank you to the crowd, it feels like home here. They gave us a boost in confidence. Win our next game and we’ll see what happens. Now we believe we can win from anywhere.”Pakistan, who moved ahead of England to fourth in the table, now need to win their final match against Bangladesh on Friday and hope other results go their way to advance to the semi-finals.EARLY BLOWS Earlier, Pakistan fast bowler Shaheen Afridi claimed four wickets to restrict Afghanistan to a modest 227 for nine from 50 overs on a flat batting track at Headingley.Having won the toss and elected to bat, Afghanistan stumbled early on, losing captain Gulbadin Naib and Hashmatullah Shahidi in back-to-back deliveries to Afridi, who produced a blistering opening spell with the new ball.Afridi, playing only his 18th ODI at the age of 19, returned in the death overs to remove Najibullah Zadran and Rashid Khan to finish as pick of the Pakistan bowlers with 4-47.It was a third consecutive win for Pakistan as their campaign gathers momentum in the business end of the tournament.“We know it was not an easy target. Their bowlers used the conditions very well. Everyone chipped in, it was good team work,” Sarfaraz said.“We all know that it is not easy to win our last four games, but we go match by match. We will all be watching India v England tomorrow.”Meanwhile, Afghanistan remain winless after eight games, and just as they did against India earlier this month, they came agonisingly close to a memorable victory.The game was marred by a clash between the supporters of both teams in the stands, with ESPNcricinfo reporting that at least two fans were evicted from the match.Videos shared on social media also showed fans fighting outside the venue, with the International Cricket Council (ICC) saying it will take action against “any anti-social behaviour”.AFGHANISTAN 1st innings Rahmat Shah c Babar Azam b Imad Wasim 35Gulbadin Naib c Sarfaraz Ahmed b Shaheen Afridi 15Hashmatullah Shahidi c Imad Wasim b Shaheen Afridi 0 Ikram Ali Khil c Mohammad Hafeez b Imad Wasim 24Asghar Afghan b Shadab Khan 42Mohammad Nabi c Mohammad Amir b Wahab Riaz 16Najibullah Zadran b Shaheen Afridi 42Samiullah Shinwari not out 19Rashid Khan c Fakhar Zaman b Shaheen Afridi 8Hamid Hassan b Wahab Riaz 1Mujeeb Ur Rahman not out 7Extras: (lb-8, w-10) 18Total: (nine wkts, 50 overs) 227Fall of wickets: 1-27, 2-27, 3-57, 4-121, 5-125, 6-167, 7-202, 8-210, 9-219. Bowling: Imad Wasim 10-0-48-2, Mohammad Amir 10-1-41-0 (w-1), Shaheen Afridi 10-0-47- 4 (w-4), Mohammad Hafeez 2-0-10-0, Wahab Riaz 8-0-29-2 (w-4), Shadab Khan 10-0-44-1 (w-1). PAKISTAN 1st innings Fakhar Zaman lbw Mujeeb Ur Rahman 0Imam ul-Haq stp. Ikram Ali Khil b Mohammad Nabi 36Babar Azam b Mohammad Nabi 45Mohammad Hafeez c Hashmatullah Shahidi b Mujeeb Ur Rahman 19Haris Sohail lbw Rashid Khan 27Sarfaraz Ahmed run-out (Najibullah Zadran) 18 Imad Wasim not out 49Shadab Khan run-out Gulbadin Naib 11Wahab Riaz not out 15 Extras: (1b-1. lb-4, w-5) 10 Total: (seven wkts, 49.4 overs) 230 Fall of Wickets: 1-0, 2-72, 3-81, 4-121, 5-142, 6-156, 7-206.Bowling: Mujeeb Ur Rahman 10-1-34-2,Hamid Hassan 2-0-13-0, Gulbadin Naib 9.4-0-73-0 (w-1), Mohammad Nabi 10-0-23-2, Rashid Khan 10-0-50-1 (w-3), Samiullah Shinwari 8-0-32-0 (w-1).