Pettini struck seven fours in his unbeaten 154-ball 87
Essex captain Mark Pettini hit an unbeaten half century to give his side a slight advantage over Glamorgan at Sophia Gardens.
Replying to Glamorgan's 311, Essex openers Alastair Cook (57) and John Maunders (44) began day two by adding 98 for the first wicket.
Robert Croft (3-73) then struck three times to reduce the hosts to 107-3.
But Pettini (87no) steadied the ship, guiding his side to 277-7 at the close, a deficit of 34 runs.
On a pitch that offered little encouragement to the Glamorgan seamers, off-spinner Croft was introduced less than an hour into the day's play and should have had Cook stumped on 27 only for Mark Wallace to fluff his lines.
But the former England man changed the complexion of the innings just after lunch with a burst of 3-8 from 14 balls.
First he trapped Maunders leg before, then had Cook caught by Jim Allenby at midwicket before Tom Westley was adjudged lbw off the next delivery.
Croft may have done more damage had Pettini not been put down on 22 and 34, but the Essex captain made the most of his good fortune and went on to rebuild the innings in a stand of 64 with Matt Walker (25).
Walker fell to Dean Cosker (3-90) before tea, but Pettini, now accompanied by James Foster, went on to reach his half century from 82 deliveries.
Foster was trapped lbw by Allenby shortly after the break, before Cosker broke through twice to remove Graham Napier and Tim Phillips.
Pettini and David Masters then survived the final 10 overs of the day to help Essex close in on a first-innings lead.
Bookmark with:
What are these?