 The railway line connecting Tiruchirappalli Junction railway station to Chennai Egmore via Thanjavur , the Main Line is a historical line established by South Indian Railway Company in 1879 . The Great South Indian Railway Company ( GSIR ) operated a broad gauge rail service between Nagapattinam and Tiruchirapalli via Thanjavur between 1861 and 1875 . During 1875 it was converted to a meter gauge line ( MG line ) . Modern day Thanjavur railway junction has three rail heads leading to Tiruchirapalli , Kumbakonam and Thiruvarur . Thanjavur is connected by rail with most important cities and towns in India . There are daily express trains to Chennai , Mysore , Ernakulam , Thrissur , Palakkad , Coimbatore , Erode , Tiruppur , Tiruchirapalli , Salem , Karur , Madurai , Tirunelveli , Rameswaram , Tiruchendur , Cuddalore , Dharmapuri , Viluppuram , Chengalpattu , Mannargudi , Bengaluru , Dindigul , Karaikudi , Manamadurai and weekly trains to Tirupati , Nellore , <unk> , Visakhapatnam , Hubli , Vasco da Gama , Goa , Vijayawada , Nagpur , Jabalpur , <unk> , <unk> , Allahabad , Varanasi and Bhubaneswar . There are frequent passenger trains from the city to towns like Thiruvarur , Nagapattinam , Karaikal , Tiruchirapalli , Kumbakonam , Mayiladuthurai and Nagore . 
