The completion of the Castle Douglas and Dumfries Railway in 1859 further improved the town's connections, and it soon developed into a major market town for the surrounding area. This is still true today and the 1900 hexagonal market building is in constant use. Although the railway was closed in 1965, the A75 trunk road was developed roughly following the lines of the original military road and passes through Castle Douglas. The many hotels and pubs which derived from coach stops are an indication of the town's importance as a stopping place for travellers.