Chanda Sahib took over the government after driving out the principal claimant Muhammed Ali Khan Wallajah from Arcot. Muhammed Ali Khan Wallajah sought refuge in the fortress of Tiruchirappalli which Chanda Sahib besieged with the help of the French East India Company provoking the British East India Company to come to the rescue of the exiled Nawab. The British allied with the Marathas and sent three armies, which after some initial setbacks, successfully forced Chanda Sahib and the French to come to terms with them. Chanda Sahib surrendered to the Marathas but was treacherously beheaded. Muhammed Ali Khan Wallajah was enthroned with British assistance and he agreed to pay a regular tribute to them. British rule Suspecting the Carnatic ruler, Umdat Ul-Umra of having given clandestine support to Tipu Sultan during the Anglo-Mysore Wars, the British East India Company took over the kingdom in 1801 and reduced the Nawab to the status of a titular ruler. The district of Trichinopoly was created and Tiruchi city was made its capital. A cantonment of the Madras Regiment was set up in Tiruchirappalli. During the 19th century, Tiruchirappalli was famous throughout the British Empire for its unique variety of cheroot known as the Trichinopoly cigar. The municipality of Trichinopoly was created in 1866 as per the Town Improvements Act of 1865 followed by the municipality of Srirangam in 1871 and Golden Rock in 1972. The three municipalities were merged in 1994 to form the Tiruchirappalli municipal corporation. In 1875, the Prince of Wales paid a visit to the Ranganathaswamy Temple and donated a gold cup. The first Indian census conducted in 1871 returned a population of 76,530 for Tiruchirappalli making it the second largest city in Madras Presidency, next only to the capital city of Madras. The Great Southern of India Railway Company was established in 1853 with its headquarters at Tiruchirappalli. In 1859, the company constructed its first railway line connecting Tiruchirappalli and Nagapattinam. The company was merged with the Carnatic Railway Company in 1874 to form the South Indian Railway Company. The South Indian Railway Company moved one of its principal workshops from Nagapattinam to Tiruchirappalli establishing the Golden Rock Railway Workshop in 1928. The company was eventually liquidated in 1944 and its assets taken over by the Government of India. Tiruchirappalli played an important part in the Indian Independence Movement. Many of its leaders such as V. V. S. Aiyar,