Boyd Rankin took four wickets as Ireland gained control of their final ICC Intercontinental Cup contest against Scotland in Dubai.
Ireland, who need to win to stand any chance of surpassing Afghanistan at the top of the table, finished day two 296 runs ahead.
Scotland started the day on 37 without loss and Kyle Coetzer and George Munsey took them to 55 before the Scotland captain cut a Rankin delivery to point for 22.
Munsey made it to 38 but the Scotland innings fell apart with O’Brien adding to his all-round effort by claiming three wickets for 14 runs. Tim Murtagh also claimed two as Scotland ended their first innings on 114 before lunch, 110 runs adrift.
Safyaan Sharif had shown some defiance for the Scots with a 26 and he bowled Paul Stirling lbw for 12 runs in the fifth over, but Ireland racked up the runs to move further beyond their opponents.
Gary Wilson hit 56 following from 87 balls before Simi Singh (34 not out) and Kevin O’Brien (13 not out) took Ireland to 186 for five after 45 overs before close of play.