Glamorgan 435 (Cooke 96*, Patel 66, Lloyd 66, Wright 5-64) and 251 for 5 dec (Brathwaite 103*) beat Leicestershire 263 (Wright 60, Patel 4-58) and 132 (Salter 3-6) trail by 291 runs
Glamorgan gained the maximum 24 points by defeating Leicestershire by 291 runs to keep their slim hopes of promotion alive, but they will need to beat Durham by a similarly resounding margin at Chester-le-Street next week and hope that Gloucestershire or Northants- who play each other in the final game - drop sufficient points.
Leicestershire's only hope was to battle for a draw, but apart from Mark Cosgrove, who faced 158 balls for his 28, no one could master an accurate Glamorgan attack, where both seam and spin triumphed.
The visitors, who required a massive 424 to win, resumed on 33 for 2 on a glorious final day of the season at Sophia Gardens, were soon in trouble against Michael Hogan, who took two wickets in his opening spell.
Hassan Azad was the first to go, when he was undone by a perfect yorker from Hogan that left the batsman on his hands and knees, then four overs later George Rhodes was bowled by a beauty that pitched middle and hit the off stump.
Harry Dearden then joined Cosgrove, and he played some handsome strokes through the offside, but was out shortly before lunch when he played down the wrong line at Andrew Salter and was adjudged leg before for 37.
Leicestershire were 101 for 5 at lunch, but the end came quickly after the interval as they lost their last five wickets for 31 runs in 23.4 overs .Harry Swindells was caught at slip when he edged one that turned from Samit Patel, and was followed by Cosgrove, whose vigil ended when he was run out. He pushed the ball to short leg, and although Billy Root had the ball in his hands, Cosgrove set off, realised his mistake, but by then Root had underhanded the ball onto the stumps.
Chris Wright, who had top scored in the first innings did not last long, also edging a catch to slip off Salter, then from the next ball Will Davis, sensing that were six men crouched around the bat, tried to launch the ball into Cathedral Road, only to spoon a catch to cover point.
When Gavin Griffiths gave David Lloyd his third catch at slip for Patel's second wicket, and Salter, at the other end, had finished with 3 for 6 from 10 overs, Glamorgan had won with ample time to spare.