Pakistan 230 for 8 (Kamran 81*, Wahab 47*, Johnston 2-35) beat Ireland 229 for 9 (Joyce 116*, Rehman 4-48, Junaid 2-59) by 2 wickets
Scorecard and ball-by-ball details

In the feudal world of cricket, an Associate nation has never beaten a Full Member in an international series, but Ireland came desperately close to beating Pakistan before a breathtaking partnership took the game, and series, away.

Kamran Akmal and Wahab Riaz came together with just under 100 needed off 13 overs. Kamran is experienced in Irish conditions, having played with the Limavady club in 2002 and 2003, and with his young colleague he went about repairing the early damage wreaked by the Irish seamers. But Kamran is a wily performer and eased into destructive mode as the bowlers struggled to find their lengths.

Wahab took nine balls to get off the mark but his demolition of Tim Murtagh in the 47th over proved decisive and he made an ODI career best 47 not out. Murtagh, a Middlesex seamer, is the leading championship performer this season but he was taken apart by clean hitting as the over went 2,6,6,0,4,6 with the maximums soaring over long-off and square leg.

With just eight needed off three overs, Kamran tried to finish it off and lost his wicket, but Wahab and Junaid Khan saw Pakistan home. The decisive eighth wicket partnership of 93 took just 62 balls. "Two special innings took it away from us", admitted Kevin O'Brien, who took the Man-of the-Series award.

Ireland had a special innings of their own to enjoy. Ed Joyce walked to the wicket in Clontarf after just five balls of Ireland's innings, and left it unbeaten 49.1 overs later. His highest score of 116 was an innings of high quality from a player who became only the second man to make an ODI century for two countries. The first was also an Irishman, Eoin Morgan, who is playing for England.

Pakistan made three changes to their bowling attack, bringing in debutant Asad Ali, Wahab Riaz and Abdur Rehman for Mohammed Irfan, Saeed Ajmal and Ehsan Adil. Ireland, too, called upon a newbie in James Shannon, who came in for club-mate Andrew White.

And Ali quickly showed his great promise, finding extravagant seam movement as he reeled off three maidens to open his international career. Ireland were quickly 4 for 2, but the experienced southpaws Joyce and Niall O'Brien stitched the ideal partnership for the situation and battled their way through to see off Ali and Junaid Khan, with the debutant's opening spell reading 6-4-4-1.

When he reached 33, Joyce passed 1000 runs in ODIs, 471 of which he made for England. The pair was batting with increasing confidence when Riaz found the edge of O'Brien's bat. Gary Wilson perished soon after when he ballooned an attempted reverse sweep to slip, but Joyce found a steady partner in Kevin O'Brien.

Kevin has often been accused of inconsistency, but he continued here as he finished Thursday's tie. He played several powerful drives and was looking set to make back-to-back ODI fifties for the first time since the 2007 World Cup when he holed out on the midwicket boundary.

Joyce rode his luck - an entertaining juggling act from Mohammed Hafeez spilled to earth after five attempts when he was on 61 - and moved serenely towards his century. Kevin's departure seemed to cause panic in the Irish lower order and four wickets fell for 11 as Rehman found some turn. Trent Johnston fell to the first leg-before decision of the series but Murtagh hung around long enough to see his former Middlesex colleague into three figures, which Joyce raised with his only six, over midwicket.

Ireland had switched pitches two days before the game, banking on a greener track to negate the Pakistan spinners. The 7,000 euro bill for moving the scaffolding and grandstands looked money well spent until those last ten overs. Trent Johnston and Tim Murtagh found extravagant seam and played havoc with the Pakistan top order, reducing them to 17 for 4.That score could have been worse had two catches not been forsaken off Johnston to dismiss Misbah-ul-Haq and Shoaib Malik before they had scored.

But experienced players of the Pakistan middle order battled their way back with stands of 43, 52 and 21. Misbah and Shoaib were able to settle in when the Irish opening bowlers were removed and the pressure slipped a little. George Dockrell turned back on the heat with a spell of 8-2-16-1, but by the time he came back for his last two overs, Kamran was eyeing up the ropes.

Skipper William Porterfield knows how close his team came to a historic series victory. "We're pretty dejected at the minute because of the position we got ourselves in," he said. "We're very disappointed not to win."