Calum MacLeod struck an unbeaten century as Scotland denied Ireland a 3-0 series victory with an eight-wicket win in the third and final one-day international in Dublin.
John Mooney was the star of the show for the home side, smashing 96 off 77 balls with 12 fours and two sixes before he was dismissed off the penultimate ball of the innings by Safyaan Sharif. His fine performance came a day after he revealed the full extent of his battle with depression in a lengthy radio interview.
Durham batsman MacLeod struck 15 fours in his unbeaten 116 off 141 balls for his second ODI century as Scotland comfortably chased down their target of 242 with more than four overs to spare to gain a consolation win.
Following the early loss of his opening partner Matty Cross for one, MacLeod shared in a match-winning stand of 179 for the second wicket with 23-year-old Hamish Gardiner, whose 89 was his maiden ODI fifty.
Earlier, Ireland had made 241 for nine after being sent into bat at Malahide as they sought to wrap up a series whitewash.
Captain Kevin O'Brien was Ireland's next-best contributor with 36, with off-spinner Majid Haq taking five for 54 for the visitors, whose victory left the home side with a 2-1 series success.