Jokowi was born and raised in a riverside slum in Surakarta. He graduated from Gadjah Mada University in 1985, and married his wife, Iriana, a year later. He worked as a carpenter and a furniture exporter before being elected mayor of Surakarta in 2005. He achieved national prominence as mayor and was elected governor of Jakarta in 2012, with Basuki Tjahaja Purnama as his deputy. As governor, he reinvigorated local politics, introduced publicised blusukan visits (unannounced spot checks) and improved the city's bureaucracy, reducing corruption in the process. He also introduced years-late programs to improve quality of life, including universal healthcare, dredged the city's main river to reduce flooding, and inaugurated the construction of the city's subway system.
In 2014, he was nominated as the PDI-P's candidate in that year's presidential election, choosing Jusuf Kalla as his running mate. Jokowi was elected over his opponent Prabowo Subianto, who disputed the outcome of the election, and was inaugurated on 20 October 2014. Since taking office, Jokowi has focused on economic growth and infrastructure development as well as an ambitious health and education agenda. On foreign policy, his administration has emphasised "protecting Indonesia’s sovereignty", with the sinking of illegal foreign fishing vessels and the prioritising and scheduling of capital punishment for drug smugglers. The latter was despite intense representations and diplomatic protests from foreign powers, including Australia and France. He was re-elected in 2019 for a second five-year term, again defeating Prabowo Subianto.