Brazilian jockey Jorge Ricardo broke down in tears as he claimed his 12,844th victory to equal the world record for a rider.
The 56-year-old raised his fist aloft after drawing level with the mark set by retired Canadian Russell Baze.
"I waited long for this and I finally got it," he said after winning on Jubileia at Gavea in Rio de Janeiro.
He has competed for 41 years, which is just under 15,000 days, so is not far off winning a race a day on average.
The jockey - nicknamed 'Ricardinho' - will now return to his base in Buenos Aires, Argentina, where he is expected to break the record.
Ricardo travelled to his native Rio on Sunday, needing only three wins to equal Baze's record. He won twice from seven races, and on Monday rode six more before reaching the landmark.
Apart from Baze, no other jockey in the world has even reached 10,000 wins. The leading British rider is Sir Gordon Richards, who finished on 4,870 victories in 1954.
"I never in my life imagined I'd win so many races," Ricardo told AFP. "If you were going to think something up, you'd never imagine winning nearly 13,000."
Rivalry - Ricardo v Baze
The duel between Ricardo and Baze was a long-running contest until the Canadian retired aged 57 in 2016.
For about 15 years they shadowed each other, one reaching the 10,000 mark first, then the other 11,000 and so on.
"I think we have something of a connection," Ricardo said. "He must have known about the races I was winning here and I always checked out what he won there. There was a symbiosis."
They only met a few times, including in England at the Shergar Cup team event at Ascot in 2008.
They also took part in a special 2014 head-to-head in Brazil, which Ricardo won.
It became a battle against each other, but also against age and injuries.
During his career, Ricardo has broken his collarbone, arm, shoulder blade, elbow, finger, and rib. He has also been sick with lymphoma.
His wife Renata Teixeira, 42, said he was a loving but often "absent" father and that their children "although feeling proud, miss him".
"Every time he wins he seems to be even more excited. He gets even worse," she said.
Ricardo in numbers
Began racing when he was 15
Estimates he has ridden in 70,000 races
Won 26 jockeys' titles in a row in Brazil
Best seasonal total: 477 wins