During Neolithic times, humans largely avoided Kerala's rain forests and wetlands. There is evidence of the emergence of prehistoric pottery and granite burial monuments in the 10th century BC that resemble their counterparts in Western Europe and the rest of Asia. These were produced by speakers of a proto-Tamil language. Thus, Kerala and Tamil Nadu once shared a common language, ethnicity and culture; this common area was known as Tamilakam. Kerala became a linguistically separate region by the early 14th century. The ancient Cherans, whose mother tongue and court language was Tamil, ruled Kerala from their capital at Vanchi and was the first major recorded kingdom. Allied with the Pallavas, they continually warred against the neighbouring Chola and Pandya kingdoms. A Keralite identity—distinct from the Tamils and associated with the second Chera empire—and the development of Malayalam evolved between the 8th and 14th centuries. In written records, Kerala was first mentioned in the Sanskrit epic Aitareya Aranyaka. Later, figures such as Katyayana, Patanjali, Pliny the Elder, and the unknown author of the Periplus of the Erythraean Sea displayed familiarity with Kerala.
Muniyaras (Keralite dolmens or megalithic tombs) in Marayoor, erected by Neolithic tribesmen. The Chera king's dependence on trade meant that merchants from West Asia established coastal posts and settlements in Kerala. Many — especially Jews and Christians — also escaped persecution, establishing the Nasrani Mappila and Muslim Mappila communities. According to several scholars, the Jews first arrived in Kerala in 573 BC. The works of scholars and Eastern Christian writings state that Thomas the Apostle visited Muziris in Kerala in 52 AD to proselytize amongst Kerala's Jewish settlements. However, the first verifiable migration of Jewish-Nasrani families to Kerala is of the arrival of Knai Thoma in 345 AD. Muslim merchants settled in Kerala by the 8th century AD. After Vasco Da Gama's arrival in 1498, the Portuguese sought to control the lucrative pepper trade by subduing Keralite communities and commerce.
Conflicts between the cities of Kozhikode (Calicut) and Kochi (Cochin) provided an opportunity for the Dutch to oust the Portuguese. In turn, the Dutch were ousted at the 1741 Battle of Colachel by Marthanda Varma of Travancore (Thiruvathaamkoor). Meanwhile, Mysore’s Hyder Ali conquered northern Kerala, capturing Kozhikode in 1766. In the late 18th century, Tipu Sultan — Ali’s son and successor—launched campaigns against the expanding British East India Company; these resulted in two of the four Anglo-Mysore Wars. He ultimately ceded Malabar District and South Kanara to the Company in the 1790s. The Company then forged tributary alliances with Kochi (1791) and Travancore (1795). Meanwhile, Malabar and South Kanara became part of the Madras Presidency.
Memorial of Veera Pazhassi Raja (the "Lion of Kerala") in Mananthavady, Wayanad. Kerala saw comparatively little defiance of the British Raj—nevertheless, several rebellions occurred, including the 1946 Punnapra-Vayalar revolt, and heroes like Pazhassi Raja and Kunjali Marakkar earned their place in history and folklore. Many actions, spurred by such leaders as Sree Narayana Guru and Chattampi Swamikal, instead protested such conditions as untouchability; notable was the 1924 Vaikom Satyagraham. In 1936, Chitra Thirunal Bala Rama Varma of Travancore issued the Temple Entry Proclamation that opened Hindu temples to all castes; Cochin and Malabar soon did likewise. The 1921 Moplah Rebellion involved militant Mappila Muslims battling Hindus and the British Raj.
After India's independence in 1947, Travancore and Cochin were merged to form Travancore-Cochin on July 1, 1949. On January 1, 1950 (Republic Day), Travancore-Cochin was recognised as a state. Meanwhile, the Madras Presidency had become Madras State in 1947. Finally, the Government of India's November 1, 1956 States Reorganisation Act inaugurated the state of Kerala, incorporating Malabar district, Travancore-Cochin (excluding four southern taluks, which were merged with Tamil Nadu), and the taluk of Kasargod, South Kanara. A new legislative assembly was also created, for which elections were first held in 1957. These resulted in a communist led government—one of the world's earliest—headed by E.M.S. Namboodiripad. Subsequent social reforms favoured tenants and labourers. This facilitated, among other things, improvements in living standards, education, and life expectancy.