Ed Joyce and Niall O'Brien shared an unbroken third wicket partnership of 106 to put Ireland firmly in control of the InterContinental Cup final against Afghanistan in Dubai.

Ireland closed day two on 159 for 2, an overall lead of 164 with three days still to play, and the pair showed all their first-class experience as they negated the powerful Afghanistan bowling attack, with Mohammed Nabi using no fewer than eight bowlers in an unsuccessful attempt to get a breakthrough.

The pair batted through the final session relatively untroubled, with Sussex skipper Joyce ending the day on 74 not out, which included 13 fours as he was patience personified content to pounce on anything remotely loose.

O'Brien proved the perfect foil as the pair rotated the strike not allowing the Afghan attack to settle into any sort of rhythm. The Leicestershire keeper is on 40 not out, and he in conjunction with Joyce will be looking to bat Afghanistan out of the contest tomorrow.

The pair clearly relish batting together, as they put on 181 against the UAE in Sharjah earlier in the competition.

The Irish second innings had started poorly, losing Paul Stirling (7) to a strangled catch down the legside off Dawlat. Skipper William Porterfield went on the offensive, playing positively as he raced to 34 from just 32 balls (6 fours, 1 six) before a mental aberration to the last ball before tea saw him smack a half volley from Nabi straight to Rehmat Shah at square leg.

While Joyce and O'Brien will take the plaudits for their sensible batting, the real credit must go to the Irish bowling unit who performed magnificently to restrict their opponents to just 182 on what seasoned observers reckoned was at least a 300 par track.

John Mooney (5-45) had his best bowling figures in international cricket, while George Dockrell (3-52) and Trent Johnston (2-50) both excelled.

Johnston accounted for the dangerous Nabi, who top scored with 42, while Dockrell and Niall O'Brien combined to dismiss the obdurate Stanikzai (41). It was one of his five dismissals for O'Brien, which included two stumpings as the Afghanistan lower order attempted to hit their way out of trouble.

O'Brien has six centuries in the InterContinental Cup – second only to Ryan ten Doeschate (7). If he can match the Dutch player tomorrow, then Ireland will be in a dominant position to claim a historic treble to cap off a truly memorable 2013.

Scores in brief:
Ireland 187 all out, 61 overs
(John Anderson 55, John Mooney 33; Dawlat Zadran 4-44, Rahmat Shah 3-36, Samiullah Shenwari 2-26) and 159-2, 46 overs (Ed Joyce 74 not out, Niall O’Brien 40 not out, William Porterfield 34).

Afghanistan 182 all out, 77.5 overs (Mohammad Nabi 42, Asghar Stanikzai 41, Shabir Noori 29, Rahmat Shah 20; John Mooney 5-45, George Dockrell 3-52, Trent Johnston 2-50).