 Railways in Malaysia began because of the need to transport tin from mines in the hinterland of the West Coast states of Peninsular Malaysia to coastal ports.The first railway line, which was opened on 1 June 1885, was about 13 km long and ran between Port Weld and Taiping, the heart of the tin-rich Larut Valley in Perak state.The second line was opened a year later to link Kuala Lumpur, again the center of tin-mining activities in the Klang Valley, and Klang and subsequently to Port Swettenham (Port Klang today).