the St Kilda and Brighton Railway Company, which opened a line from St Kilda to Brighton in 1857. The first country line opened in 1857, when the Geelong and Melbourne Railway Company started services on its line from Geelong to Newport. In 1859, the government-owned Victorian Railways Williamstown line opened, connecting Williamstown and Geelong to Spencer Street station. More country lines followed in 1859 when the Victorian Railways opened a line from Footscray, on the Williamstown line, to Sunbury. The Victorian Railways had taken over construction from the Melbourne, Mount Alexander and Murray River Railway Company, established in 1853 to build a railway to Echuca, but which had failed to make any progress. The first line to Melbourne's south-eastern suburbs was opened in 1859 by the Melbourne and Suburban Railway Company, running from Princes Bridge railway station to Punt Road (Richmond), South Yarra, and Prahran. That line was extended to Windsor in 1860, connecting with the St Kilda and Brighton Railway Company line from St Kilda. The new line replaced the indirect St Kilda and Windsor line to the city, which was closed in 1867. Another suburban line was built by the Melbourne and Essendon Railway Company in 1860, running from North Melbourne to Essendon, with a branch line from Newmarket to Flemington Racecourse, which opened in 1861. On the eastern side of the city, the Melbourne and Suburban Railway Company opened a branch line from Richmond to Burnley and Hawthorn in 1861. By that point, the railways of Melbourne were a disjointed group of city-centric lines, with various companies operating from three unconnected city terminals—Princes Bridge, Flinders Street, and Spencer Street stations. The smaller companies quickly encountered financial problems. The St Kilda and Brighton Railway Company and Melbourne and Suburban Railway Company were absorbed by the Melbourne and Hobson's Bay Railway Company in 1865, forming the Melbourne and Hobsons Bay United Railway Company. The Melbourne and Essendon Railway Company was taken over by the Victorian Government in 1867. The Melbourne and Hobsons Bay United Railway Company was not taken over by the Victorian Government until 1878. The terminals themselves were linked in 1879, when track was built at street level along the southern side of Flinders Street, connecting with Spencer Street station, although the track was only used at night, for freight traffic. It was not until 1889 that the two-track Flinders Street Viaduct was built between the two