Betfair and British Racing have signed a five-year commercial deal that is the first of its kind and will be worth around £40m to the sport.
Betfair has agreed to pay British Racing 10.75% of all revenues on the sport from its UK customers.
Paul Bittar, chief executive of the British Horseracing Authority, said: "We are delighted that we have been able to reach an agreement with Betfair, one which represents a landmark for both the racing and betting industries.
"It brings many benefits, including substantial and increased guaranteed funding as well as importantly providing certainty for the sport in relation to Betfair's contribution. We hope that similar arrangements with other betting operators will follow."
No such agreement has ever been signed before and it is believed that other betting operators will be consulted on similar commercial agreements with British Racing, which is comprised of the British Horseracing Authority (BHA), the Racecourse Association and the Horsemen's Group.
Martin Cruddace, Chief Legal and Regulatory Officer at Betfair, added: "This deal is a genuinely historic moment.
"For the first time, British Racing and Betfair have proved it is possible for us to work together on a truly commercial basis. Of course it has not been easy but the end result completely justifies all the hard work.
"We hope that this marks a new era and call on other betting operators to adopt similar agreements to help ensure a strong, healthy and vibrant horseracing industry in this country."
John Penrose MP, Minister for Tourism and Heritage at the DCMS, described Betfair's willingness to be the first operator to do such a deal as "impressive and admirable".