Glamorgan 121 (Palladino 6-29) and 16 for 1 need a further 286 to beat Derbyshire 251 and 171 (Hughes 57)
An inspired spell of seam bowling from Tony Palladino put Derbyshire in a commanding position and left Glamorgan facing the prospect of another defeat after 21 wickets fell on the second day of the Division Two match at Derby.
The 35-year-old ripped through Glamorgan's fragile batting to take 6 for 29 in 13 overs, including his 300th first-class wicket for Derbyshire, as the visitors were shot out for 121. They lost their last eight wickets for 38 to trail by 130 on first innings but Derbyshire were then bowled out for 171 with Alex Hughes top-scoring with 57 and Glamorgan closed 16 for 1 chasing 302 for victory.
There had been no sign of the mayhem to come when Kiran Carlson and Tom Cullen rebuilt the innings in bright sunshine after Connor Brown had been yorked by Lockie Ferguson and Stephen Cook edged Ravi Rampaul to second slip.
Glamorgan were well placed at 83 for 2 but the wheels came flying off when Carlson tried to pull a ball from Palladino that was not quite short enough and was caught at fine leg. By lunch, the innings was in tatters at 94 for 7 with Palladino bowling former Derbyshire seamer Graham Wagg with one that kept low and spreading Ruaidhri Smith's stumps with the final ball of the morning.
Timm van der Gugten at least spared Glamorgan from being asked to follow-on by driving Palladino down the ground but was cleaned up by the next ball and David Lloyd got a brute that leapt to take the shoulder of the bat. Kieran Bull was struck on the helmet before Ferguson bowled him leaving Glamorgan needing an inspired performance in the field to stay in the game.
The demands placed on the batsmen by a lively pitch were highlighted when Billy Godleman was defeated by lift and movement from van der Gugten and when Wayne Madsen bottom-edged a pull into his stumps, Glamorgan sensed an opening.
Lloyd had Tom Lace lbw in the last over before tea but by then, the lead was nudging 200 and Hughes fought his way to a 79 ball 50 to keep the momentum with Derbyshire despite both Gary Wilson and Matt Critchley falling in successive overs from Bull.
Hughes cut Smith to point as three wickets fell for five runs but Harvey Hosein took Derbyshire's lead past 300 to leave Glamorgan with an improbable target considering they had not passed 265 in their previous three Championship matches.
It looked even more unlikely when Palladino struck again when he bowled Cook in the final over to leave Glamorgan contemplating a seventh consecutive defeat.