|Test match, Rajiv Gandhi Stadium, Dehradun (day four 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 & 149-3 (47.5 overs) Shah 76, Janat 65|
|Afghanistan win by seven wickets|
Afghanistan earned their first Test win after Rahmat Shah's 76 and Ihsanullah Janat's 65 helped them earn a seven-wicket victory over Ireland.
Starting day four on 29-1 chasing 147 for victory, the duo's 139-run partnership ended any hopes of an unlikely Ireland fightback in Dehradun.
After hitting 98 in Afghanistan's first innings, Shah was out for 76 just three short of the victory target.
Mohammad Nabi quickly departed but the Afghans were not to be denied.
'Historic day for Afghanistan'
Hashmatullah Shahidi smashed the winning boundary to trigger celebrations in the Afghanistan dressing room.
"It's a historic day for Afghanistan, for our team and our people," said the winning captain Asghar Afghan, who made 67 in the first innings.
"We have been playing for a while, we have been playing first-class cricket, so we have that composure.
"The bowlers were very good, Rashid (Khan), Yamin (Ahmadzai). Now we're going to South Africa for World Cup preparation. We will try our best to play good cricket."
Ireland 'outplayed' admits Porterfield
Ireland were on the back foot from the opening day when they were they were bowled out for 172 at the Rajiv Gandhi Stadium.
Afghanistan responded with a total of 314 to secure a 144-run first-innings lead and despite Ireland's improved second-innings total of 288, helped by Andrew Balbirnie's 82, the Afghans were still in a strong position going into the penultimate day.
Ireland captain and opener William Porterfield, who managed only nine runs in the contest, admitted that the Afghans "outplayed us".
"We had to capitalise in the first innings. If we'd done how we'd done in the second innings, it could have been a completely different game. But credit to Afghanistan."
Both Ireland and Afghanistan were playing their second-ever Test since being awarded a full member status in 2017.
The Irish side's home debut ended in a five-wicket defeat by Pakistan in a hard-fought contest last May, while Afghanistan succumbed inside two days against top-ranked India a month later in Bengaluru.
Prior to the Test, Afghanistan won a Twenty20 series 3-0 at their adopted home in Dehradun before Ireland rebounded to earn a 2-2 draw in a one-day series.