Puducherry has a history that reaches back to the ancient Indian Ocean trade. At Arikamedu, a few kilometres south of the town, archaeologists have found the remains of a busy trading port that flourished around the 2nd century BCE to the 1st century CE. Finds such as Roman pottery, wine jars and glass, alongside locally made beads and textiles, show that the site traded with the Mediterranean world. The region was also part of the Tamil country celebrated in early Sangam literature, and the area was known as a place of Vedic learning.
Over the following centuries the region came under several great South Indian powers. The Pallavas of Kanchipuram, the Cholas and the Pandyas each ruled here at different times, and inscriptions and temples from these periods survive in and around the territory. Later the region formed part of the Vijayanagara Empire and then came under various regional rulers. Old temples such as the Varadaraja Perumal Temple and the shrines at Villianur and Bahour reflect this long Tamil heritage.
European traders arrived in the 17th century. The French East India Company set up a trading post at Pondicherry in 1674, and under François Martin it grew into the main French settlement in India. The Dutch captured the town in 1693 but returned it a few years later. The French also acquired Mahe on the Malabar coast, Yanam on the Andhra coast and Karaikal on the Tamil coast in the 18th century. Under Governor Joseph François Dupleix in the mid 18th century, Pondicherry became the base for French ambitions in South India during the Carnatic Wars with the British. The British captured and destroyed much of the town in 1761, and it changed hands several times before it was finally restored to France in 1816.
French rule shaped the town's distinctive layout, with a neat grid of streets and a canal separating the French quarter, now known as White Town, from the Tamil quarter. Visitors can stroll along the seafront Promenade, see the Aayi Mandapam in Bharathi Park, and visit churches such as the Basilica of the Sacred Heart and Notre Dame des Anges, as well as the Manakula Vinayagar Temple. As a French territory, Pondicherry became a refuge for Indian nationalists escaping British authorities. The Tamil poet Subramania Bharati lived here for about a decade, and Sri Aurobindo arrived in 1910. The Sri Aurobindo Ashram, founded in 1926, and the nearby international township of Auroville, founded in 1968, still draw visitors from around the world.
After Indian independence, a movement grew for the French settlements to join India. Chandernagore in Bengal voted to do so in 1949. Following a vote by elected representatives in 1954, the French territories of Pondicherry, Karaikal, Mahe and Yanam were transferred to Indian administration on 1 November 1954. A treaty of cession was signed in 1956 and the transfer formally took legal effect in 1962.
In 1963 the territory became a union territory with its own elected legislative assembly. It is unusual in being made up of four separate regions spread across three states: Puducherry and Karaikal within Tamil Nadu, Mahe in Kerala and Yanam in Andhra Pradesh. In 2006 the official name of both the town and the territory was changed from Pondicherry to Puducherry, which remains the capital.