In Chhatrapati Shivaji Maharaj era, Shayistekhan's raid on Deccan led to major fights in Pen between Moghals and Marathas. Initially the mMoghal army led by Sardar Taherkhan occupied Pen's fort of Mahalmeera and looted surrounding villages, which included desecration of the grand temple of Goteshwar. Shivaji's army fought back. They defeated Kartalabkhan in nearby Umbarkhind and officer Balakhi, near Ratangad. Mahalmeera was also taken back on 27 February 1662 and the following day, after a valiant struggle, Pen's Bastion (presently, the site of Tehsil office) was secured by Shivaji's army. In this conquest, Sardar Vaghoji Tupe fought against an equally skillful Moghal officer but at the crucial moment, Tupe dealt a decisive blow which killed the officer and ensured Maratha victory. Vaghoji was also critically injured and died soon afterwards. Shivaji Maharaj visited Pen on two occasions, on 6 August 1668 and 11 May 1674.