Ravi Bopara struck his first century of the season to put Essex in a strong position on the second day of their LV= County Championship Division Two clash with Glamorgan.
Bopara, who returned to Essex colours after being on England Lions duty against New Zealand last week, was dismissed shortly before the close for 145 out of 343-9 - giving the visitors an overall lead of 112 at the SWALEC Stadium.
The standout bowler for Glamorgan was Australian paceman Michael Hogan, who recorded figures of 5-65.
Resuming their first innings at 10-2 in reply to the hosts' 231 all out, Essex lost Jaik Mickleburgh to the eighth over of the day, leg before to Hogan.
At 25-3, they were in some trouble but Bopara and Mark Pettini (28) dug in before Hogan picked up his fourth wicket, having Pettini well caught one-handed by Stewart Walters at second slip leaving Essex 86-4.
But Bopara found more useful support from Ben Foakes, putting on 83 for the fifth wicket. The England Under-19 batsman batted well for his 38 before edging slow left armer Dean Cosker to slip where Jim Allenby took a good catch diving forward.
Glamorgan then got another breakthrough in the penultimate over before tea having Greg Smith (seven) caught behind before Bopara put on 91 in 30 overs with James Foster.
Five overs before the close, Bopara's impressive innings then came to an end when he was bowled attempting to pull Graham Wagg.
While Tim Phillips was trapped leg before by Allenby in the next over, Graham Napier contributed an unbeaten 41 from 48 balls by the close to leave Essex on top.