Newmarket lies on the ancient
Icknield Way, and
Bronze Age barrows have provided evidence of early settlement in the area.
Devil's Dyke, an earthwork that crosses Newmarket Heath between the two racecourses, was built by
Anglo-Saxons in the seventh century. The town acquired its name in the early thirteenth century, when Richard de Argentein, who had married the daughter of the
lord of the manor of
Exning, was granted a
charter by
King Henry to hold a weekly market. A charter for an annual fair was then granted in 1223. The High Street divided the town between two parishes: Exning in Suffolk to the north and
Woodditton in Cambridgeshire to the south. St Mary's separated from Exning to become a parish in its own right in the sixteenth century, while All Saints separated from Woodditton in the eighteenth century. Newmarket's royal connection began when
James I visited the town in February 1605 and saw the potential of
Newmarket Heath for
hare coursing and
hawking. At first he leased the Griffin inn, then, in 1608, he bought the property and built
Newmarket Palace on the site, which extended from the High Street west of Sun Lane to All Saints Church. The court spent about a month in the spring, and sometimes a month in the autumn, in Newmarket. The first palace building suffered from subsidence and sank on one side when King James was in residence in 1613.
Simon Basil, and later,
Inigo Jones, were commissioned to build new lodgings for the King and the
Prince of Wales. Jones's design for the prince's lodging had three storeys and was
Italianate in style. Although there had been occasional races on Newmarket Heath during the reign of James I, it was his son,
Charles I, who established the sport in the town, building a stand on the Heath to watch races. Charles last visit to Newmarket before the
civil war was in 1642. He returned to the town as a prisoner in June 1647, having been captured at
Holdenby House in
Northamptonshire. He was placed under house arrest for about ten days in the palace, although he was allowed to ride on the heath. In 1650, the palace was sold to a group of seven men, including
John Okey, and was demolished. Following the
Restoration,
Charles II re-established the royal connection with Newmarket. In 1668, he commissioned
William Samwell to build a new palace on the High Street. It was described by
John Evelyn as "meane enough, and hardly capable for a hunting house, let alone a royal palace!" Charles II also built a training yard and the town became a centre for racing, with the Spring and Autumn meetings taking place during the king's visits. In 1683, a fire swept through the town on the north side of the High Street, killing three people and destroying houses, shops, barns and stables. The damage was estimated at £20,265 4s 8d.
William III and
Queen Anne both spent time in Newmarket; Queen Anne founded a boys' school and a girls' school in the town. The first three
Hanoverian kings had little interest in racing and did not visit Newmarket.
George IV, while
Prince of Wales, owned racehorses and frequented the town until 1791, when a scandal involving his horse
Escape and his jockey
Samuel Chifney led to a falling out with the
Jockey Club, which had established its headquarters in Newmarket in 1752. The prince never returned to Newmarket, although he continued to keep his horses in training there. The palace was sold in the early nineteenth century and much of it was demolished. The development of painting on
sporting themes in the early eighteenth century was centred on the Newmarket Rracecourse and the three founders of the sporting school,
John Wootton,
James Seymour and
Peter Tillemans, painted many scenes of the racecourse and its environs. In 1887, a clock tower was erected at the north-east end of the High Street to celebrate the
Golden Jubilee of Queen Victoria. During
World War I, tented army camps were set up on the Heath. A memorial, erected on land donated by the Jockey Club, was dedicated in October 2021. During World War II, the Rowley Mile racecourse became an
RAF base. Racing continued at a few courses during both world wars; the
Derby was run at Newmarket between 1915–18 and 1940–45. On the afternoon of 18 February 1941, ten bombs were dropped on the High Street, killing 27 people. In the early 1970s, the old Rookery area of narrow streets and small shops and houses to the north of the High Street was demolished to make way for a new market place and shopping centre. The Newmarket bypass was opened in 1975. ==Geography and governance==