India has one of the longest military histories, dating back several millennia. The first reference of armies is found in the Vedas as well as the epics Ramayana and Mahabaratha. There were many powerful dynasties in India: Maha Janapadas, Matsya Kingdom, Shishunaga Empire, Gangaridai Empire, Nanda Empire, Maurya Empire, Sunga Empire, Maha-Megha-Vahana Empire, Kuninda Kingdom, Chola Empire, Chera Empire, Pandyan Empire, Satavahana Empire, Western Satrap Empire, Kushan Empire, Vakataka Empire, Kalabhras Kingdom, Gupta Empire, Pallava Empire, Kadamba Empire, Maukhari Empire, Western Ganga Kingdom, Vishnukundina Empire, Chalukya Empire, Maitraka Empire, Harsha Empire, Rajput States, Shahi Empire, Eastern Chalukya Kingdom, Pratihara Empire, Pala Empire, Rashtrakuta Empire, Paramara Kingdom, Yadava Empire, Solanki Kingdom, Western Chalukya Empire, Hoysala Empire, Sena Empire, Eastern Ganga Empire, Kakatiya Kingdom, Kalachuri Empire, Delhi Sultanate, Deccan Sultanates, Gajapati Kingdom, Ahom Kingdom, Vijayanagar Empire, Mysore Kingdom, Mughal Empire, Maratha Empire, Sikh Empire, etc. Classical Indian texts on archery in particular, and martial arts in general are known as Dhanurveda.
India has a maritime history dating back 5,000 years. The first  tidal dock is believed to have been built at Lothal around 2300 BCE during the Indus Valley Civilization, near the present day Mangrol harbour on the Gujarat coast. The Rig Veda written around 1500 BCE, credits Varuna with knowledge of the ocean routes and describes naval expeditions. There is reference to the side wings of a vessel called Plava, which give stability to the ship under storm conditions. A compass, Matsya yantra was used for navigation in the fourth and fifth century AD.