Graham Wagg struck a thunderous century on day two to put Glamorgan briefly on top against Derbyshire before the away side fought back in the evening session.
Wagg smashed his way from 50 to 100 in just 27 balls as he put on a record 9th wicket partnership for Glamorgan against Derbyshire of 167 with Lukas Carey who hit a career-best 62.
"Matthew Maynard (coach) told me I was batting number nine and then said 'prove me wrong', so I've got a hundred and I enjoyed playing with Lukas who got a career-best in a great partnership," said Wagg.
"The mind-set was just to get to 250-plus, but to get 394 it was an unbelievable effort from Lukas and it's nice to get a hundred because it's been a couple of seasons.
"We were in a fantastic position but they've come back and batted really well. There's enough in the wicket but we didn't execute our plans."