Matt Pardoe and Moeen Ali each hit a century as Worcestershire made 322-3 after being put into bat by Glamorgan.
Moeen was unbeaten on 155, three runs short of the highest score of his career, while Pardoe’s 102 was his maiden first-class hundred.
They shared a second-wicket stand of 219 before Pardoe became spinner Dean Cosker’s 450th Championship wicket.
Michael Hogan had given Glamorgan a great start by trapping home skipper Daryl Mitchell lbw for two.
But their only other breakthrough came in the penultimate over when Thilan Samaraweera was caught by Ben Wright off James Allenby for 38.
Moeen batted 332 minutes and faced 239 balls, while Pardoe was at the crease for 272 minutes and received 235 deliveries.