In 1889 the administrative county of Durham consisted of the historic county less the county boroughs of Gateshead, South Shields and Sunderland. The boundary with the North Riding of Yorkshire was adjusted: the part of the town of Barnard Castle that was in Yorkshire was added to County Durham, but the part of the Borough of Stockton-on-Tees in Durham was given to the North Riding. For all non-administrative purposes, such as lieutenancy, the County of Durham comprised the administrative county and associated county boroughs.