In 1809, the British shifted their cantonment to Bangalore, outside the old city, and a town grew up around it, which was governed as part of British India. Following India's independence in 1947, Bangalore became the capital of Mysore State, and remained capital when the new Indian state of Karnataka was formed in 1956. The two urban settlements of Bangalore – city and cantonment – which had developed as independent entities merged into a single urban centre in 1949. The existing Kannada name, Bengalūru, was declared the official name of the city in 2006.
The name "Bangalore" represents an anglicised version of the Kannada language name, "Bengalūru" ಬೆಂಗಳೂರು[ˈbeŋɡəɭuːru] (listen). It is the name of a village near Kodegehalli and was copied by Kempegowda to the city of Bangalore. The earliest reference to the name "Bengalūru" was found in a ninth-century Western Ganga Dynasty stone inscription on a "vīra gallu" (ವೀರಗಲ್ಲು) (literally, "hero stone", a rock edict extolling the virtues of a warrior). In this inscription found in Begur, "Bengalūrū" is referred to as a place in which a battle was fought in 890 CE. It states that the place was part of the Ganga Kingdom until 1004 and was known as "Bengaval-uru", the "City of Guards" in Halegannada (Old Kannada).
An apocryphal story recounts that the 12th century Hoysala king Veera Ballala II, while on a hunting expedition, lost his way in the forest. Tired and hungry, he came across a poor old woman who served him boiled beans. The grateful king named the place "benda-kaal-uru" (literally, "town of boiled beans"), which eventually evolved into "Bengalūru".Suryanath Kamath has put forward an explanation of a possible floral origin of the name, being derived from benga, the Kannada term for Pterocarpus marsupium (also known as the Indian Kino Tree), a species of dry and moist deciduous trees, that grew abundantly in the region.
On 11 December 2005, the Government of Karnataka announced that it had accepted a proposal by Jnanpith Award winner U. R. Ananthamurthy to rename Bangalore to Bengalūru. On 27 September 2006, the Bruhat Bangalore Mahanagara Palike (BBMP) passed a resolution to implement the proposed name change. The government of Karnataka accepted the proposal, and it was decided to officially implement the name change from 1 November 2006. The Union government approved this request, along with name changes for 11 other Karnataka cities, in October 2014, hence Bangalore was renamed to "Bengaluru" on 1 November 2014.