Mahmud of Ghazni invaded India 17 times between 1000-1025 CE. His first invasion was in 1001 CE against the Hindu Shahi ruler Jaipal, and his most famous raid was on the Somnath Temple in 1024-1025 CE. These invasions were primarily motivated by wealth plunder rather than territorial conquest.