Channel 4 had threatened to end its commitment to racing if the Cheltenham Festival was sold to a rival broadcaster.
However it managed to strike a deal with the Racecourse Holdings Trust, which owns 13 racecourses including Cheltenham, just 24 hours before the deadline.
RHT became the pivotal player as terrestrial broadcast rights came up for renegotiation following the collapse of the Attheraces consortium, which comprised Channel 4, BSkyB and Arena Leisure.
The group had been toying with the idea of selling racing to ITV after the channel expressed an interest in the Cheltenham Festival.
Richard Johnston, managing director of RHT, told The Times: "Channel 4 has played a key role in championing racing and in raising the profile of a sport with an expanding audience and we are delighted to continue our 20-year relationship with it."
Channel 4 issued its first ultimatum to RHT last week, threatening to cancel coverage of RHT tracks from this weekend if an agreement was not reached.
If you have an opinion on this or any other issue raised on Brand Republic, join the debate in the .