Glamorgan 3 for 0 trail Worcestershire 284 (D’Oliveira 75, van Beek 53, Hose 43, McIlroy 3-41) by 281 runs
A mixture of probing and accurate bowling but also some undistinguished shots had put Glamorgan in command until D’Oliveira redressed the balance of the day.
He top-scored with 74 not out and was given excellent support by Logan van Beek and on loan Essex all-rounder Ben Allison during stands of 101 and 64.
D’Oliveira has a liking for playing against Glamorgan, having scored three Championship hundreds, including a career best 202 not out, and his best bowling figures of 7 for 92.
Earlier, Gareth Roderick and Adam Hose had led a partial recovery in challenging conditions during the morning session from 33 for 3.
Worcestershire were able to secure two batting bonus points before being dismissed shortly before the close and then Glamorgan openers Ed Byrom and nightwatchman James Harris survived two overs.
A see-saw day ended with honours even with McIlroy returning 3 for 41 and Harris 3 for 74.
Of concern to Glamorgan will be what appeared to be a hamstring injury suffered by Timm van Gugten during his 17th over which had to be completed by James Harris.
Allison was brought in after injuries to Matthew Waite and Adam Finch led to a search for a temporary replacement.
Spinner Ben Kellaway made his first-class bow for Glamorgan who went into the game in third place and 14 points adrift of their opponents.
Glamorgan skipper Kiran Carlson opted to bowl first and the new-ball pair of van der Gugten and McIlroy quickly made inroads in a pitch offering enough assistance to encourage the seamers.
Jake Libby has experienced a prolific summer with more than 900 Championship runs but the opener tried to force van der Gugten off the back foot and was caught behind.
Azhar Ali then gave his wicket away when he clipped McIlroy straight to midwicket.
Jack Haynes, playing his first senior game for six weeks after injury, was undone by a fine delivery from Harris which nipped away and was caught behind.
Roderick passed 600 runs for the summer but survived a low chance to second slip on 23 off former Worcestershire Academy player Zain Ul Hassan.
He battled away in typically resolute fashion through to lunch with Hose who had returned to the side after his spell with Northern Superchargers in The Hundred.
But there was another clatter of wickets on the resumption.
Roderick (43) added only a single before he was lbw after pushing forward to Harris in the third over of the afternoon session.
Kashif Ali, the leading six-hitter in the Metro Bank One Day Cup with 21 maximums, replicated Azhar Ali in picking out mid wicket off McIlroy.
Hose had batted impressively in mixing defence with aggression but on 43 tried to cut a widish delivery from McIlroy and only found first slip.
D’Oliveira and van Beek joined forces and redressed the balance during an aggressive stand.
The latter had attracted head-lines in June for smashing 30 for the Netherlands off a Super Over from his close friend Jason Holder in a ICC World Cup qualifier against the West Indies in Zimbabwe.
Van Beek, who also played for Worcestershire in the Metro Bank One Day Cup, mixed some powerful hitting with watchful defence while D’Oliveira batted with typical fluency.
A cover-drive off Kellaway for his 10th four enabled van Beek to complete a 73-ball half century and also earn Worcestershire their first batting point.
The partnership was broken shortly after tea when van Beek (53) attempted to drive ul Hassan and was caught and bowled low down.
But D’Oliveira completed his own fifty from 87 deliveries, also at Kellaway’s expense with a late cut for his seventh boundary, and Allison gave him good support.
They added 64 in 18 overs before Allison (37) aimed a drive at Harris and was bowled via the inside edge.
Ul Hassan then wrapped up the innings by dismissing Joe Leach and Dillon Pennington cheaply to leave D’Oliveira undefeated with his 139-ball innings containing seven boundaries.