Petersen shines for Essex
Alviro Petersen struck a superb 145 against his old county Glamorgan but a late collapse saw Essex surrender the initiative at Cardiff.
After Essex were asked to bat England opener Alastair Cook could only make nine in his first championship match of the season and his fellow international Ravi Bopara was then out for a third-ball duck.
In between those wickets, Billy Godleman fell for 21, before Tom Westley was dismissed for three to leave the visitors struggling on 65 for four.
However, Petersen and Mark Pettini (56) then joined forces in a fifth-wicket stand worth 181 to take their side up to 246 for four and seemingly well in control..
But that was before they lost five wickets for just 13 runs to be reduced to 259 for nine, at which stage they declared their first innings closed. It left Glamorgan three overs to survive, which Gareth Rees and Nick James safely negotiated as the Welsh county finished the day on one for nought.
At the start of the day Huw Waters could have claimed a wicket with the fourth ball of match but Rees could not hang on to a sharp chance at short leg off Godleman at bat-pad.
Cook got off the mark in the fifth over cutting Waters in front of square for four through extra cover.
Waters got the prized scalp of the England man soon after though, Cook being caught behind as he pushed forward to leave Essex 21 for one.
Godleman struck his first boundary in the 20th over as he clipped Owen to long leg and then survived a huge appeal for leg before.
But slow left-armer Dean Cosker struck with his fourth ball to celebrate his 500th wicket in first-class cricket to have Godleman caught at slip by Stewart Walters.
From 53 for two it became 60 for three in the next over as Bopara went without scoring, trapped lbw by Moises Henriques playing across the line.
There was more bad news for Essex straight after lunch when Westley fell to the sixth ball of the afternoon session, departing to a reaction catchy at short leg by Rees off Graham Wagg.
Petersen was still there though, and he continued to keep the scoreboard ticking, reaching his first half-century of the season from 73 balls and following that up with a six off Cosker over long-on.
With Pettini having dropped anchor at the other end Petersen was the dominant partner in the fifth-wicket partnership with the former Glamorgan captain reaching three figures from 147 balls with 12 fours and a six.
But much of the duo's good work was undone late on as Essex suffered a dramatic collapse.
Pettini went caught at first slip by Wagg, who then struck in the next over to trap Petersen leg before. He then bowled Essex captain James Foster and had Greg Smith leg before to finish with figures of four for 61.
Waters had David Masters caught at mid-on as Essex were reduced to 259 for nine before declaring just before the close.