The history of the city of Solo, officially known as Surakarta, is closely linked to dramatic events in the history of Java. The city was founded in the mid-18th century when the ruler of the Mataram Sultanate, Pakubuwono II, was forced to relocate his capital. His previous palace city, Kartasura, was destroyed during an uprising in 1744. A village named Sala (or Solo) was chosen as the new site for the capital, and on February 17, 1745, the new palace complex—Keraton Surakarta Hadiningrat—was officially established here.
Solo's emergence as a major centre was driven by several key factors. Firstly, it was a political decision—creating a new symbol of power and stability following chaos. Secondly, its geographical location on the fertile plains near the Bengawan Solo River ensured the city's prosperity through agriculture and established it as a vital trade hub. A pivotal event in the city's early history was the signing of the Treaty of Giyanti in 1755, which divided the Mataram Sultanate. As a result, Solo became the capital of the newly formed Surakarta Sunanate, cementing its status as one of the two principal centres of Javanese power and culture alongside Yogyakarta.
From its very foundation, Solo evolved into a cradle of refined Javanese culture. The royal court (Keraton) became the primary patron of the arts, earning the city worldwide renown for its exquisite batik, melodious gamelan music, traditional wayang puppetry, and classical dance. Economically, the city developed as a hub for the trade of rice, sugar, and other agricultural produce, attracting merchants and contributing to its growth and prosperity.