Tony McCoy set a new personal best as victory aboard It's A Gimme in the Betfred Summer Plate at Market Rasen took him past old ally Martin Pipe's career total of 4,191 winners.
McCoy had equalled the mark with the appropriately-named On The Record at Uttoxeter on Wednesday, and went one better as the Jonjo O'Neill-trained 2-1 market leader It's A Gimme claimed the feature event of the day at Lincolnshire track.
The perennial champion jockey cut a confident figure throughout the two-and-three-quarter-mile Listed event and slowly eased his mount into contention heading down the back straight.
The seven-year-old looked likely to run away with the prize as he tracked the leaders into the home turn, but stable companion Lost Legend, ridden by Richie McLernon, gave McCoy and favourite-backers a real fright.
There was little to chose between the O'Neill pair jumping the final fence, but in trademark fashion McCoy lifted It's A Gimme home to triumph by a length and three-quarters. Mazuri Cowboy was third.
A mud-splattered McCoy walked back to the weighing-room while It's A Gimme received treatment for exhaustion.
He said: "The horse is OK. He's just tired. He'll be all right."
McCoy said: "I was lucky Jonjo had a few in the race and put me on this one. This is a willing little horse, who kept finding for me.
"The record was just a very personal thing between me and Mr Pipe. He set the standard and revolutionised training. He is someone I held in high esteem and we had great times together in my time as his stable jockey.
"We've had a bit of banter pretty much since I've ridden my 4,000 winner. It's only a personal thing and I will be putting in a satisfying call tonight."
McCoy was presented with a 20kg Lincolnshire Poacher cheese by the racecourse management in honour of his achievement.
Pipe said: "He's an inspiration to all the jockeys and to everyone in racing.
"He's marvellous for our sport and it's just great we've got someone like him.
"Now, he's finally beaten me. All of us in racing are so proud of him for doing it."