Glamorgan 795 for 5 declared (Northeast 410*, Cooke 191*, Ingram 139) beat Leicestershire 584 (Mulder 156, Mike 91, Hill 81, Kimber 68, Walker 64, Swindells 52, Salter 4-158) and 183 (Mulder 59, Hogan 4-43) by an innings and 28 runs
Sam Northeast made an unbeaten quadruple-century before Glamorgan pulled off an astonishing victory on an extraordinary day of records in the LV= Insurance County Championship at the Uptonsteel County Ground in Leicester.
Spectators at Leicestershire's Grace Road headquarters had witnessed one of English cricket's three greatest feats of batting as Northeast finished with a monumental 410 not out in a total of 795 for 5 declared in reply to Leicestershire's first-innings 584.
Then to cap it all Glamorgan dismissed their opponents for 183 in 59.4 overs to win by an innings and 28 runs.
The victory - which lifts Glamorgan to second place in Division Two - capped an amazing day in which Northeast joined Brian Lara, Archie MacLaren and Graeme Hick as one of only four players in the first-class game in England to score more than 400 runs in an innings.
The Leicestershire total of 584 is the highest in county cricket by a team that subsequently lost by an innings - smashing the previous mark of 527 scored in an innings defeat against Northamptonshire in 1995 - and is thought to be the highest in first-class cricket to suffer that fate anywhere in the world.
Glamorgan's coach, Matt Maynard, said: "To have a man, Sam Northeast, in your side who has joined only nine other players to have scored more than 400 in an innings is incredible. It was a remarkable feat and he batted selflessly as well, when we needed to up the scoring rate.
"A lot of things go into a score like that. You have to maintain a high level of concentration but he never seemed to deviate from his plans until right at the end, when he started to be more aggressive.
"I don't think anyone here will have witnessed a better innings. The way he went from 200 to 300 on Friday, it was as if there were no fielders. Every attacking shot he played went for four. I've seen some good players, I've batted with some good players, but to see someone maintain that level for so long was just incredible."
Glamorgan won after declaring with a lead of 211 at lunch on the final day. They scored a breathtaking 232 runs in the pre-lunch session, a rate of scoring that left Leicestershire with 65 overs to survive - a task that proved beyond them as Michael Hogan (4 for 43) and Michael Neser (3 for 60) combined with spinner Andrew Salter (2 for 36) and James Harris (1 for 27) to blow them away.
Northeast, who had never during his 16-year career imagined making 300 until he did so on Friday, now possesses the ninth-highest individual score in world cricket, behind only Lara's all-time high of 501 not out for Warwickshire at Edgbaston in 1994 and MacLaren's 424 for Lancashire at Taunton in 1895 as the third highest in England. Hick's 405 not out for Worcestershire, also at Taunton in 1988 is nudged down to fourth place.
Northeast numbered 45 fours and three sixes, sharing an unbroken stand of 461 in 71.3 overs with wicketkeeper Chris Cooke, who finished unbeaten on 191 - by coincidence Northeast's career-best before this game.
The stand was the eighth-highest partnership in County Championship history and, as far as a sixth-wicket stand was concerned, it was the highest ever recorded in English first-class record and the second highest in history.
It was also a record total for Glamorgan, whose total is the ninth highest ever made in the county championship.
Leicestershire will not need reminding that Cooke was dropped on just 3 and again on 15 on Friday - both comfortable catching chances - or that they missed Northeast at slip on 96.
That error, one of only a handful in the entire marathon innings, seemed a distant memory as Northeast led the players off at lunch with almost every spectator on their feet prior to Glamorgan's declaration after a morning session that saw 232 runs scored and a string of records set.
Northeast eclipsed Steve James's 309 not out as the highest score by a Glamorgan player and replaced Kevin Pieterson's 355 not out for Surrey at The Kia Oval in 2015 as the highest individual score against Leicestershire.
Glamorgan passed their highest previous total - 718 for 3 declared in the James match at Colwyn Bay - and the partnership overtook the unbroken 425 by Adrian Dale and Viv Richards against Middlesex in Cardiff in 1993 as the Glamorgan record for any wicket.
Cooke completed his hundred off 161 balls, having hit 12 of his 19 fours to reach that mark, later adding three sixes in what would be the second highest score of his career, behind his unbeaten 205 against Surrey last season.
Northeast, by nature a classical strokeplayer, reached the cusp of passing 400 having allowed himself the liberty of just one six. Only in the last over before lunch, presumably aware that it would be the last of the innings, did he throw caution to the wind.
It paid off as he whacked Roman Walker over long-on for six to go to 402 and a place in the top 10 highest scores of all time, followed by another over long-off to move up another notch by taking down Hick's 405.
Leicestershire looked downcast in the field for much of the morning and misfielded several times on a parched and bumpy outfield.
Glamorgan's declaration at 211 in front gave them 65 overs to conjure a result and arrived sooner than they had expected, according to Maynard. "The original plan had been to bat on after lunch. But we just scored so quickly that we had the 210-lead at lunch that we thought would take us until 20 minutes or so afterwards. I thought it was perhaps a one in 30 chance of winning."
The pitch was still offering precious little help to the bowlers. But Salter dismissed Rishi Patel and Lewis Hill after Hogan had removed opener Louis Kimber via a fine catch by Northeast at second slip. When Hogan had Colin Ackerman and Joey Evison caught behind in the same over, Glamorgan sensed an opportunity with Leicestershire five down, still 83 behind and 27 overs remaining.
Wiaan Mulder and Harry Swindells put on 42 over the next 14 overs, which seemed to tip the balance towards Leicestershire surviving, only for the momentum to swing back Glamorgan's way as Neser dismissed Swindells and Ben Mike in the space of three balls, both leg-before.
A fine catch at cover by Kiran Carlson accounted for Walker as Harris claimed a wicket before Hogan found some away movement from a ball 56 overs old to have Mulder caught behind and Neser produced a perfect yorker to bowl Wright to finish the match.