Durham 517 for 6 dec and 296 for 2 (Lees 138*, Bedingham 112*) lead Leicestershire 422 (Ackermann 146, Mulder 56, Raine 4-114) by 391 runs
Lees, who made 101 in the first innings, was stranded on 99 when bad light threatened to end play earlier, but after stewing in the dressing room for almost three quarters of an hour was able to celebrate shortly after the resumption.
Earlier, Leicestershire posted their second highest total of the season but were still 95 behind on first innings, despite Colin Ackermann's fine 146, Ben Raine taking four for 114 and on-loan leg spinner Matt Parkinson three for 115 as the home side were bowled out for 422.
Durham skipper Scott Borthwick will look to declare early, bearing in mind it took his bowlers almost 110 overs to take 10 first-innings wickets on a pitch still holding together, and with the seemingly batter-friendly Kookaburra ball.
Durham were able to replace 19-year-old Stanley McAlindon with Matty Potts following the latter's release by England. Leicestershire's young leg-spinner Rehan Ahmed, who had been named as a potential substitute in this match, remained with Ben Stokes's squad.
The addition of Potts, who took 13 wickets in the corresponding fixture last season, added to the challenge facing Leicestershire on the third morning in cool, overcast conditions after resuming on 335 for four.
Nonetheless, while they avoided the follow-on and picked up a couple more batting points, they would have been disappointed to lose their last six wickets for 77.
In the event, Potts too often dropped short to no great effect in his opening six-over burst, while Raine demonstrated the virtue of bowling at the stumps by dismissing Wiaan Mulder, Tom Scriven and Chris Wright all leg before in two spells, one from each end, lifting his wickets tally to 34 for the season, two more than Potts.
Ackermann, with whom Mulder shared a 106-run stand for the fifth wicket, was much harder to dislodge, yet with the sixth 150 of his first-class career just one boundary away a rather weary-looking cut shot at a ball from Matt Parkinson outside off stump saw him caught at gully.
Potts returned after lunch, bowled full and straight and nipped out Callum Parkinson and Matt Salisbury in the space of three deliveries of his second over, knocking off stump out of the ground in each case, in so doing grabbing a third bowling point for Durham in the nick of time.
As in the first innings, Durham went hard against the new ball and had doubled their lead by the 20th over, although at a cost of a couple of wickets. Michael Jones was well caught in the leg-side deep by Ed Barnes as he pulled the ex-Durham seamer Salisbury. Scott Borthwick pulled Salisbury for six over the shorter boundary but misread a ball from off-spinner Ackermann, who took an almost casual return catch one-handed above his head.
Meanwhile, Lees combined muscle and innovation to post 50 from 65 balls before Bedingham launched into Ackermann and then Parkinson with driven sixes. By tea, Durham's lead was 240, putting them on course to be 400 in front by the close.
Bedingham drove Barnes for a couple of boundaries, the first of which took him to 53 from 56 balls, and while thereafter the accumulation of runs was more steady than spectacular, the pair had still extended the lead to 315 when bad light forced a 44-minute interruption.
After his tantalising wait on 99, Lees blocked out a maiden from Ackermann before lofting Parkinson over long-on for his 10th four from 158 balls, picking up his first six the over afterwards, although he was dropped on the midwicket boundary in doing so.
As the pair sought to score quickly, Bedingham joined him in reaching three figures from 105 balls, having hit eight fours and four sixes, three of them off Parkinson.