Spinner Rashid Khan's five-wicket haul helped Afghanistan bowl out Ireland for 288 and put the team in sight of a maiden Test win on the third day of the one-off Test in Dehradun on Sunday.
Chasing 147 for victory, Afghanistan were 29 for one with Ihsanullah Janat batting on 16 and Rahmat Shah unbeaten on 11 at the close of play.
Afghanistan lost Mohammad Shahzad, but Janat and Shah, who made 98 in Afghanistan's first innings total of 314, ensured there was no more damage when the stumps were drawn.
Earlier in the day, Andy Balbirnie (82) and Kevin O'Brien (56) scored half-centuries each but Khan came up with career-best figures of five for 82 to bundle out Ireland in the final session of play.
Khan accounted for the wickets of James McCollum, O'Brien, Stuart Thompson, George Dockrell and Andrew McBrine to put Afghanistan in a commanding position.
Brief scores:
Ireland: 172 & 288 all out in 93 overs (Andy Balbirnie 82, Kevin O'Brien 56; Rashid Khan 5/82).
Afghanistan: 314 & 29/1 in 16 overs (Ihsanullah Janat batting 16, Rahmat Shah batting 11 ).
ICC ODI rankings: Kohli, Bumrah unmoved
Kirsten reckons IPL before World Cup is advantage India
Bangladesh cricketers return home after narrow escape in New Zealand
Australian F1 GP Pix: Mercedes' Bottas wins season opener