SHAFTESBURY, a market town and municipal borough in the northern parliamentary division of Dorsetshire, England, 103 m. W.S.W. from London by the London & South-Western railway (Semley station). Pop. (1901) 2027. It lies high on a hill above a rich agricultural district. The church of St Peter is Perpendicular; those of Holy Trinity and St James are in the main modern reconstructions. The borough is under a mayor, 4 aldermen and 12 councillors. Area 157 acres.

Although there are traces of both British and Roman occupation in the immediate neighbourhood, the site of Shaftesbury (Cœr Palladur, Cœr Septon, Seaftonia, Sceafstesbyrig, Shafton) was probably first occupied in Saxon times. Matthew Paris speaks of its foundation by the mythical king Rudhudibras, while Asser ascribes it to Alfred, who made his daughter Ethelgeofu the first abbess. It is probable that a small religious house had existed here before the time of Alfred, and that it and the town were destroyed by the Danes, being both rebuilt about 888. In 980 Dunstan brought St Edward's body here from Wareham for burial, and here Canute died in 1035. Shaftesbury was a borough containing 104 houses in the king's demesne during the reign of Edward the Confessor; in 1086, 38 houses had been destroyed, but it was still the seat of a mint with three mint-masters. In the manor of the abbess of Shaftesbury were 111 houses and 151 burgesses; here 42 houses had been totally destroyed since St Edward's reign. In 1280 the abbess obtained the royal manor at an annual fee-farm rent of £12 and remained the sole mistress of the borough until it passed at the dissolution of the monasteries to Sir Thomas Arundel, after whose execution it was granted. about 1552 to William Herbert, earl of Pembroke. In 1252 the burgesses received their first charter from Henry III. This granted that in all eyres the justices itinerant should come to Shaftesbury and that the burgesses should not answer for aught without the town and might choose for themselves two coroners annually. The reeve of the borough is mentioned in 1313–1317. The office of mayor was created between the years 1350–1352, and an inquisition of 1392 records that the mayor held a court of pie-powder and governed the town in the absence of the steward. The seal of the commonalty is extant for 1350, and that of the mayoralty first occurs in 1428. By 1471 a general assembly of burgesses had acquired power to take part in elections. There is no evidence that Elizabeth granted Shaftesbury a charter, as has been asserted, but she confiscated the common lands in 1585, the town only recovering them by purchase. This probably led to a charter of incorporation being obtained from James I. in 1604. A new charter was granted to the town in 1684, but without the surrender of the old charter confirmed by Charles II. in 1665. Shaftesbury returned two members to parliament from 1294 to 1832, when the representation was reduced to one, and it was lost in 1885. Leland speaks of Shaftesbury as a great market town, and it possessed a market in the time of Edward I. The Martinmas fair was granted in 1604. In the 17th century worsted, buttons and leather were manufactured, but these industries have disappeared.

See Charles Hubert Mayo, The Municipal Records of the Borough of Shaftesbury (Sherborne, 1889).