A horse race is a contest between two or more horses, where bettors wager on which one will finish first. Horse races have been held since ancient times, and they appear in many cultures’ myths and history, including those of Asia, Ancient Greece, Rome, Babylon, Egypt, and the Norse world. Modern horse racing involves a complex set of rules designed to keep horses safe and healthy and to ensure that bettors receive a fair deal. These rules include a minimum distance and time that horses must travel, a starting gate to prevent injuries, a race book to record bets, and a steward’s patrol to look for rule violations. The first horse to cross the finish line is declared the winner.

Horse racing has a long history and has been played in various civilizations for thousands of years, as evidenced by archeological records. It was often a central part of the Olympics and other public events, as well as in myth and legend. It is also a sport that requires tremendous physical exertion and can be fatal to the horses. The death of Eight Belles in the 2009 Kentucky Derby and that of Medina Spirit in the 2016 Belmont Stakes have prompted calls for a review of the sport’s ethics and integrity.

The earliest known written accounts of chariot and bareback horse races date from the 8th and 9th centuries bc in Asia Minor. Chariot racing was a common event in the Olympics, and a type of bareback race called a steeplechase-involving jumping over barriers-dates back as early as the 5th century bc.

In horse racing, the most important thing is safety. In the early days, professional riders (known as jockeys) would demonstrate their skills by racing a horse for potential buyers. These riders were usually young boys who wore light clothes and used a whip to guide the animal as it ran a short distance, such as a quarter, half, or mile, over fields or roads.

Before a horse race begins, a veterinary doctor examines the animal. The veterinarian will note any preexisting conditions or injuries. In addition, the veterinarian will administer a cocktail of legal and illegal drugs that may help mask injuries or artificially enhance performance. The most common drugs are a decongestant and an anti-inflammatory. The horse is then injected with Lasix, a diuretic noted on the race day program by a boldface “L.” This is to prevent pulmonary bleeding caused by hard running, which can be deadly for the animal.

During the course of a race, a team of stewards and patrol judges watches for any rule violations or other problems. After the race, the stewards will announce the winning horse and a full explanation of the process. The patrol judge, whose job is to photograph the finish, also reviews the film before declaring the final result. If the final result is very close, it is sometimes necessary to re-photograph the finish to confirm the results.