Derbyshire captain Wayne Madsen celebrated becoming the first player in the country to score 1,000 Championship runs with an unbeaten century to frustrate title-chasing Middlesex on the opening day at Derby.
Madsen led a spirited batting display by the hosts with 105 not out from 222 balls as his side closed on 279-6, with Middlesex's seamers struggling on a slow pitch.
Tim Murtagh was the pick of the attack with 2-35 from 17 overs, but Madsen's third hundred of the summer and a half-century from opener Ben Slater gave relegation-threatened Derbyshire the edge.
Middlesex would have been disappointed with the morning session when they took only one wicket after Neil Dexter had won the toss and given his bowlers first use of a green-tinged pitch.
But the bowling lacked consistency and it was not until the 17th over that the visitors broke through when Chesney Hughes got a leading edge as he tried to work Gareth Berg through midwicket and was caught at mid-off for 16.
Slater and Madsen batted patiently to take Derbyshire past lunch before Middlesex celebrated a second wicket.
Slater had shown good judgement in leaving the ball and reached his second championship 50 off 128 balls, but Middlesex's tactic of bowling short at him paid off when he edged a lifter from James Harris to wicketkeeper John Simpson to depart for 53.
But Madsen was playing with authority and after on-driving Murtagh for the boundary that took him past 1,000 first-class runs for the season, he passed the same milestone in the championship when he reached 49 by steering Harris behind point for two.
He lost Shivnarine Chanderpaul in the next over when the West Indian turned Ollie Rayner into the hands of short-leg to leave Derbyshire wobbling slightly on 123-3 but Middlesex missed two sharp chances before tea.
Rayner put down a hard return catch off Richard Johnson when he was on eight and Adam Voges spilled a low chance diving to his left at short midwicket that allowed Madsen to escape on 61.
Johnson had moved to 33 before he came down the pitch to Voges and drove him into the hands of Harris at mid-off, but Alex Hughes gave Madsen valuable support until he played across the line at Murtagh having also scored 33.
Madsen reached his 16th first-class hundred and his 15th for Derbyshire from 204 balls when he whipped Murtagh through midwicket for his 10th four and although Tom Poynton was bowled driving at Murtagh, it had been a decent day for the hosts.