The Glasgow & South Western Railway inaugurated passenger services on its link between Ayr and Mauchline in 1870. A branch was subsequently built from Annbank, near its midpoint, heading south and then east to join the Glasgow Paisley Kilmarnock & Ayr Railway at Cronberry. Its opening was celebrated on 1st July 1872.
Regular passengers services over the branch were withdrawn on 10th September 1951. Although the western end remains open, complete closure came to the rest of the line in stages, with the section between Belston Junction and Dykes Branch Junction seeing its last train on 3rd April 1966 following the demise of Whitehill Colliery.
Dykes Branch Junction was immediately beyond the eastern end of Skares Viaduct which carried the railway across Ward Burn. This attractive structure, with seven segmental arches, was built from rubble-faced pink stone. Formerly accommodating two tracks, it curves slightly to the north. The third span from the east, over the burn, is the highest whilst the westernmost arch crosses a minor road. Both abutments feature curving wing walls.
In 2002 the viaduct was refurbished by its owner British Railways Board (Residuary). The work involved the installation of new drainage - with pipes added on the north face of each pier - and concrete repairs to the masonry.