Ireland 219 for 5 (Stirling 70, Balbirnie 68, Zahir 2-55) beat Afghanistan 216 for 6 (Afghan 82, Dockrell 2-46) by five wickets
Dehradun: Ireland defeated Afghanistan by five wickets to draw the one-day international series in India 2-2.
Paul Stirling hit 70 runs and Andrew Balbirnie scored 68 to lead Ireland to victory with 16 balls remaining after the Afghans finished on 216-6.
Afghanistan captain Asghar Afghan was the top run-scorer with 82 before retiring injured, while Ireland's George Dockrell returned 2-46.
The two sides meet again in a Test match in India which starts on Friday.
Afghanistan had led the five-game series 2-1 going into Sunday's final match after the second meeting was abandoned because of rain.
The Afghans beat Ireland 3-0 in the T20 series which took place before the ODIs started on 28 February.
Ireland were unchanged from the side which lost heavily in Friday's fourth match and captain William Porterfield elected to bowl first again after winning the toss.
Captain Afghan was in fine form with the bat, hitting his third consecutive half century before having to withdraw on 82, while an extended cameo from Khan helped Afghanistan to 216-6.
Stirling's impressive 70 in response for Ireland took him past 3,500 ODI runs, while Balbirnie notched 68 to lead Ireland to victory.
Balbirnie was named Man of the Series after scoring 215 runs at an average of 71.66.