The Herne Bay & Faversham Railway company was founded in 1857. In 1859 it became the Margate & London Railway, and two years later took the name Kent Coast Railway, by which it was known for the rest of its independent existence. It built a line from Faversham to Whitstable Town in 1860, extended it to Herne Bay & Hampton-on-Sea in 1861 and opened the section from there to a station called Ramsgate on 5 October 1863. This was much closer to the seafront at Ramsgate than its predecessor, Ramsgate Town, which was opened by the South Eastern Railway in 1846. In 1871, the Kent Coast Railway was bought by the London, Chatham and Dover Railway. In June of that year, Ramsgate station took the name Ramsgate & St Lawrence-on-Sea, which it bore until 1 July 1899. For the rest of its existence it was known as Ramsgate Harbour. The station was very popular and well-used, but was on a cramped site which was reached through a tunnel down a long 1-in-75 gradient. A train went out of control down this slope on 31 August 1891. One person was killed. Plans were made to simplify the poorly connected railway network in the Thanet area; these were quickly adopted by the Southern Railway company, which took over the London, Chatham and Dover Railway's operations on 1 January 1923 as a result of the Grouping Act. It built a new line, long, to connect the former Kent Coast Railway route from Faversham and the former South Eastern Railway route from Ashford, which bypassed both Ramsgate Harbour and Ramsgate Town stations. Two new stations, Dumpton Park and Ramsgate, were built on this line to serve the town. The line and the new stations opened on 2 July 1926, and the section of line between the new junction and Ramsgate Harbour station, and the station itself, closed on the same date. The station site was bought by a company which converted it into a funfair. The station building was damaged by fire in 1998 and subsequently demolished. Part of the former route through the tunnel was opened as a narrow gauge tourist railway in 1936 which became the Tunnel Railway. Services were suspended during World War 2. It reopened but it closed in 1965 following an accident at the beach station and the owners decided to close the railway. The railway was then dismantled. In 1939 part of the abandoned railway tunnel became an air raid shelter. A network of tunnels was constructed leading from the disused railway tunnel leading under the town with various access steps to the surface. After the war finished these tunnels were abandoned. Following the award of a Heritage Lottery Grant sections of the abandoned railway tunnel and wartime air raid tunnels have been restored and were officially reopened on 27 May 2014.