In 1626, Shahaji Raje Bhosale appointed Rango Bapuji Dhadphale as the administrator of Pune. He was one of the first major developers of the town, overseeing construction of some markets and residential areas like the Kasba Peth, Somwar Peth, Raviwar Peth and Shaniwar Peth. After the destruction of the town in raids by the Adil Shahi dynasty in 1630 and again from 1636 to 1647, Dadoji Kondadev, a military and administrative officer of Shahaji, oversaw redevelopment and construction of the area. He stabilised the revenue system of Pune and the neighbourhoods of Maval to the west of town.
In addition, he developed effective methods to control disputes and enforce law and order. Construction began on the Lal Mahal palace, as Shahaji’s son Shivaji was to move there with his mother Jijabai. The Lal Mahal was completed in 1640.  Jijabai is said to have commissioned the building of the Kasba Ganapati temple. The Ganesh idol consecrated at this temple is regarded as the presiding deity (gramadevata) of the city.  Shivaji was crowned Chhatrapati in 1674, thus founding the Maratha Empire. He oversaw further development in Pune, including the construction of the Guruwar Peth, Somwar Peth, Ganesh Peth and Ghorpade Peth.
Shivaji encouraged development of dams in Parvati and Kondhwa regions of Pune for agriculture purposes. Pune and surrounding villages later provided manpower for Shivaji’s efforts to build an army during the period from 1645 to 1680. Between 1660 and 1670 the town was captured by Mughal General Shahista Khan, but was recaptured by the Marathas in 1670 after the battle of Sinhagad. During the 27-year long conflict between the Marathas and the Mughals, the town was occupied by Aurangzeb from 1703 to 1705; during this time the name of the town was changed to “Muhiyabad”.
Two years later, the Marathas recaptured Sinhagad fort and later Pune city from the Mughals as had been done in 1670. Peshwa Rule Baji Rao I the most famous of the nine Peshwas of the Maratha Empire. In 1720, Baji Rao I was appointed Peshwa (Prime Minister) of the Maratha Empire, ruled by Chattrapati Shahu.  He selected Pune as his base and started construction of Shaniwar Wada on the right bank of the Mutha river. The construction was completed in 1730, ushering in the era of Peshwa control of the city.
The patronage of the Peshwas resulted in the construction of many temples and bridges in the city, including the Lakdi Pul and the temples on Parvati Hill. Bajirao Peshwa also constructed an underground aqueduct to bring water from Katraj Lake to Shaniwar Wada. The aqueduct is still operational. Pune prospered as a city during the reign of Nanasaheb Peshwa. He developed Saras Baug, Heera Baug, Parvati Hill and new commercial, trading and residential localilties. Sadashiv Peth, Narayan Peth, Rasta Peth and Nana Peth were developed in this era.
The Peshwas fell into decline after their defeat in the 1761 Battle of Panipat. In 1802, Pune was captured by Yashwantrao Holkar in the Battle of Poona, directly precipitating the Second Anglo-Maratha War of 1803–1805. During this period Sardar Apajiram Sahasrebudhe was the Kotwal of city (further adopted Kotwal as surname) British rule Fergusson College, founded in 1885 during the British Raj, it was the first privately governed college in India.  The Third Anglo-Maratha War broke out between the Marathas and the British in 1817.
The Peshwas were defeated at the Battle of Khadki (then spelt Kirkee) on 5 November near Pune and the city was seized by the British.  It was placed under the administration of the Bombay Presidency and the British built a large military cantonment to the east of the city (now used by the Indian Army). The Pune Municipality was established in 1858. Navi Peth, Ganj Peth and Mahatma Phule Peth were developed during the British Raj. Pune was an important centre in the social and religious reform movements of the late 19th century.
Prominent social reformers and freedom fighters lived here, including Bal Gangadhar Tilak, Vitthal Ramji Shinde, Dhondo Keshav Karve and Mahatma Jyotirao Phule. Vinayak Damodar Savarkar resided in Pune when he enrolled in Fergusson College in 1902. In late 1896, Pune was hit by bubonic plague. By the end of February 1897, the epidemic was raging with a mortality rate twice the norm and half the city’s population fled. A Special Plague Committee was formed under the chairmanship of W. C. Rand, an Indian Civil Services officer.
He brought troops to deal with the emergency. Although these measures were unpopular, the epidemic was under control by May. On 22 June 1897, during the Diamond Jubilee celebration of the coronation of Queen Victoria, Rand and his military escort were killed by the Chapekar brothers. A memorial to the Chapekar brothers exists at the spot on Ganeshkhind Road (University Road) between the Reserve Bank and the Agricultural College. Pune was prominently associated with the struggle for Indian independence .
In the period 1875 and 1910, the city was a major centre of agitation and social reforms led by Mahatma Jyotirao Phule, Gopal Krishna Gokhale and Bal Gangadhar Tilak, as well as feminist Tarabai Shinde. They demanded the abolition of caste prejudice, equal rights for women, harmony between the Hindu and Muslim communities, better schools for the poor and complete independence from Britain.  Mohandas Gandhi was imprisoned at Yerwada Central Jail several times and placed under house arrest at the Aga Khan Palace in 1942–44, where both his wife and aide Mahadev Desai died.