Glamorgan 134 (Snater 6-39) and 71 for 6 (Cooke 39*, Porter 2-14, Cook 2-17) trail Essex 320 (Browne 102, Pepper 63) by 115 runs
Glamorgan's batsmen collapsed for a second time in two days as Essex turned the screw after notching a 186-run first-innings lead.
Having finally dismissed Essex for 320 in 101.2 overs, the home county slumped to 20 for 5 against a barrage of seam bowling from Sam Cooke and Jamie Porter that saw them both take 2 for 10 in the opening eight overs.
As if that wasn't bad enough, Steven Reingold was inexplicably run out going for a quick single with Billy Root. And when the hero of the first innings, Shane Snater, came on and trapped Dan Douthwaite lbw with his third ball in the 11th over, Glamorgan were 29 for 6 and hoping to scrape past their all-time worst score of 43 against Essex at The Gnoll, in Neath, in 1935.
They managed to do that and ended on 71 for 6 thanks to a stubborn 39 from skipper Chris Cooke, who put on an unbeaten 42 with Andrew Salter for the sixth wicket. It means Glamorgan will still need to score 115 runs on the third day to avoid an innings defeat.
Having resumed 42 runs behind Glamorgan's first-innings total of 134, Essex took just over an hour to establish a lead and lost England hopeful Dan Lawrence in the process. Lawrence lasted eight overs and added a mere five runs to his total before he was caught off Andrew Salter.
Opener Nick Browne played the anchor role as he progressed to his first century of the season. Michael Pepper added some fireworks in a partnership that amassed 108 runs for the fourth wicket as Essex progressed to 208 for 4.
Pepper reached his half-century in the over before Browne went to three figures. The Essex opener's century came up just before lunch with a four off Lukas Carey in the 71st over in which he faced 219 balls.
He lasted only four more balls after that when he was teased out by the off-spin of Reingold. That brought Josh Rymell to the wicket on his first-class debut and he picked up a golden duck as he was trapped lbw off Douthwaite.
That meant Essex were 217 for 5 at lunch, 83 ahead, and they lost two quick wickets after the resumption. Pepper was first to go, caught and bowled by Reingold. He hit 11 fours and a six in his 63 and Reingold struck again four overs later when he had Simon Harmer caught behind for two. At that stage Reingold, on his first-class debut, had 3 for 3 off 3.1 overs and was making a major impact.
From 233 for 7, Essex continued to build a lead as Glamorgan maintained their all-spin attack with Reingold and Slater, eventually taking the new ball in the 85th over. Adam Wheater and Snater then added 79 for the seventh wicket as the lead grew to 178 and left them needing 38 to secure the fourth batting point.
Wheater was bowled by Michael Hogan for 39, a knock that included seven boundaries, and Snater followed up his 6 for 39 with 48 before he was last man out to a catch off Salter.
Glamorgan got off to a disastrous start when Hamish Rutherford was trapped lbw by Porter with the second ball of the innings and fellow opener David Lloyd completed his pair when he went the same way to Cook.
Wickets tumbled at regular intervals until the Salter-Cooke combination, but Glamorgan were still staring at a heavy defeat.