|Test match, Rajiv Gandhi Stadium, Dehradun (day three of five)|
|Ireland 172 (60 overs): Murtagh 54*, Dockrell 39; Nabi 3-36, Ahmadzai 3-41 & 288 (93 overs) Balbirnie 82, O'Brien 56, Rashid 5-82, Ahmadzai 3-52|
|Afghanistan: 314 (106.3 overs): Rahmat Shah 98, Afghan 67, Shahidi 61; Thompson 3-28 & 29-1|
|Afghanistan need 118 more runs to win|
Afghanistan will go into the fourth day of their Test match against Ireland in Dehradun needing 118 more runs to win.
A much-improved second-innings batting display from Ireland saw them bowled out for 288 on day three, with in-form Andrew Balbirnie top-scoring with 82.
Kevin O'Brien contributed 56 and Rashid Khan ended with figures of 5-82.
The Afghans struggled to 29-1 off 16 overs by the close as they chased a target of 147 for victory in the one-off Test in India.
The Irish had been bowled out for 172 on the opening day at the Rajiv Gandhi Stadium and Afghanistan responded with a total of 314 all out to enjoy a first innings lead of 142 runs.
Having lost captain William Porterfield for a duck, Ireland began the third day on 22-1, 120 runs in arrears with nine second-innings wickets remaining.
Paul Stirling was given out lbw to leave Ireland 33-2 but Balbirnie struck 11 fours in his impressive innings and put on a third-wicket partnership of 104 with James McCollum (39).
Balbirnie's dismissal prompted a post-lunch slide of 4-20, Stuart Poynter and Stuart Thompson both falling for one, Ihsanullah catching both at first slip.
Lower order partnerships key for Ireland
O'Brien and George Dockrell (25) forged a seventh-wicket partnership of 63 while debutant James Cameron Dow (32 not out) and Tim Murtagh (27) put on 58 for the final wicket.
Rashid struck three times in three overs after tea, removing Dockrell and O'Brien lbw and having Andy McBrine stumped.
In addition to Rashid's maiden five-wicket Test haul, Yamid Ahmadzai ended with figures of 3-52.
Afghanistan lost Mohammad Shahzad for two and found themselves 5-1 after 10 overs but rallied in the final stages of the day to leave them as favourites for the win but the outcome firmly in the balance.
The two teams are playing their second Test matches, with Ireland in their first overseas game following last May's five-wicket debut defeat against Pakistan.