At around 600 AD/650 AD or so, the Pallavas under king Narasimhavarman from Tamil Nadu invaded a place in north Karnataka called Vatapi which was the capital of their rivals, the Chalukyas (Now called Badami) where they stole a ganesh statue from an abandoned temple on a hill. It was brought back as a war trophy after their victory in their battle by their top general, Paranjothi (later named Siruthondar after he became a Nayanmar saint) It is now installed in the Uthrapathisvaraswami temple in the village of Thiruchenkaattankudi (or Tiruchenkattankudi) near Karaikal, in Tamil Nadu, according to Google. Source of this story : The tour guide when I visited Mamallapuram, Tamil Nadu.