Glamorgan enjoyed an impressive day with the bat as they built up a 242-run lead over leaders Essex going into the final day in Cardiff.
Will Bragg produced a characteristically solid 119 not out to take the game away from Essex.
He shared century stands with both Mark Wallace (40) and Chris Cooke (59).
Earlier, Timm van der Gugten completed a maiden five-wicket haul in the Championship as Essex were bowled out for 313 in their first innings.
Bragg’s innings was his second hundred of the season in addition to three half-centuries, and he was 10 short of his career-best at the close.
Veteran seamer David Masters, with 2-64, was the visitors’ chief threat with the ball, but Essex could face a demanding target against a team who are yet to win this season.
Glamorgan batsman Will Bragg told BBC Wales Sport:
“Things went our way and we built hundred partnerships for the second and third wicket, but if we can get a few more runs in the morning, we can go hard at them for maybe two and a half sessions, it could be a good end to the game.
“If you get a personal best, you have to get a round of drinks in, so I’ll have to see how much money I’ve got in the bank!
“We’ve had a tricky four or five weeks where we haven’t hit our straps in the batting and bowling at the same time, but this game we’ve dug deep and we’re in a strong position.”