Records tumble as Brook and Root guide England to 823 before Pakistan collapse
Pakistan's top order failed to get going in the second innings and the hosts ended day four on 152-6, trailing England by 115 runs as the tourists set themselves up for a famous win after a Herculean batting effort.
Pakistan's Salman Agha (40) and Aamer Jamal (27) were at the crease at stumps, with England in the driver's seat heading into the final day in Multan.
With England leading by 267, Chris Woakes steamed in and took a wicket off the first ball as a fatigued Abdullah Shafique, who had been on the field for 150 overs, played a tired shot as the fast bowler rattled his off stump.
Gus Atkinson then got in on the act with the wickets of skipper Shan Masood and Babar Azam, whose poor form continued with the batsman not having scored a fifty in nine Tests.
Brydon Carse also dismissed Saim Ayub with his first ball when the set batter played a poor shot for a catch before the debutant cleaned up Mohammad Rizwan with a delivery that nipped back in to leave Pakistan reeling at 59-5.
Saud Shakeel was caught behind off Jack Leach before Agha and Jamal stitched together an unbeaten 70-run stand.
Fourth-highest score
Resuming on 492-3, England went past Pakistan's 556 to build a handy first innings lead of 267 runs thanks to Brook's 317 after Root's 262 as they ground the tired hosts to dust on another hot day.
It was the highest score for both batsmen during a 454 run-partnership - the fourth-highest in Tests - on the flat track at the Multan Cricket Stadium while also the highest partnership in England's Test history.
Root eventually departed lbw during the second session to one that kept low from Agha.
Brook, however, was particularly severe in the afternoon as he moved through the gears to score the second-fastest triple ton of all time in 310 balls and he became only the sixth Englishman to achieve the milestone.
He is also England's first triple centurion in 34 years as he punished Pakistan's bowlers. Six bowlers conceded more than 100 runs for only the second time in Test history.
The record-breaking partnership also marked only the third time two players scored more than 250 in a Test innings.
Marathon Innings
Brook's marathon innings finally ended when a miscued sweep off Ayub went straight to Masood.
Root, who eclipsed Alastair Cook as England's top Test run-scorer on Wednesday, picked up from where he left off and became the first batsman from his country to make 20,000 international runs in the morning session with a driven boundary.
The former captain was handed a reprieve on 186 when Azam dropped the simplest of catches at mid-wicket, and he made the most of it to reach his sixth double century with a single before celebrating by kissing the badge on his helmet.
In reaching the milestone, Root went past Cook again with only Wally Hammond ahead of him in England's list with seven double tons.
Brook then became the latest member of the club to delight the travelling English fans, who stayed on their feet to cheer when Root eased to his 250 with a scooped boundary in the same over bowled by Naseem Shah.
Television replays showed that the ball had struck the flap of Root's back pad but the 33-year-old did not complain and went on to better his previous best of 254 before he went shortly after lunch.