The Ottoman conquest of Bosnia marked a new era in the country's history and introduced tremendous changes in the political and cultural landscape of the region. Although the kingdom had been crushed and its high nobility executed, the Ottomans nonetheless allowed for the preservation of Bosnia's identity by incorporating it as an integral province of the Ottoman Empire with its historical name and territorial integrity - a unique case among subjugated states in the Balkans. Within this sandžak (and eventual vilayet) of Bosnia, the Ottomans introduced a number of key changes in the territory's socio-political administration; including a new landholding system, a reorganization of administrative units, and a complex system of social differentiation by class and religious affiliation.
The four centuries of Ottoman rule also had a drastic impact on Bosnia's population make-up, which changed several times as a result of the empire's conquests, frequent wars with European powers, migrations, and epidemics. A native Slavic-speaking Muslim community emerged and eventually became the largest of the ethno-religious groups (mainly as a result of a gradually rising number of conversions to Islam), while a significant number of Sephardi Jews arrived following their expulsion from Spain in the late 15th century. The Bosnian Christian communities also experienced major changes. The Bosnian Franciscans (and the Catholic population as a whole) were protected by official imperial decree, although on the ground these guarantees were often disregarded and their numbers dwindled. The Orthodox community in Bosnia, initially confined to Herzegovina and Podrinje, spread throughout the country during this period and went on to experience relative prosperity until the 19th century. Meanwhile, the schismaticBosnian Church disappeared altogether.
As the Ottoman Empire thrived and expanded into Central Europe, Bosnia was relieved of the pressures of being a frontier province and experienced a prolonged period of general welfare and prosperity. A number of cities, such as Sarajevo and Mostar, were established and grew into major regional centers of trade and urban culture. Within these cities, various Sultans and governors financed the construction of many important works of Bosnian architecture (such as the Stari most and Gazi Husrev-beg's Mosque). Furthermore, numerous Bosnians played influential roles in the Ottoman Empire's cultural and political history during this time. Bosnian soldiers formed a large component of the Ottoman ranks in the battles of Mohács and Krbava field, two decisive military victories, while numerous other Bosnians rose through the ranks of the Ottoman military bureaucracy to occupy the highest positions of power in the Empire, including admirals, generals, and grand viziers. Many Bosnians also made a lasting impression on Ottoman culture, emerging as mystics, scholars, and celebrated poets in the Turkish, Arabic, and Persian languages.
By the late 17th century, however, the Ottoman Empire's military misfortunes caught up with the country, and the conclusion of the Great Turkish War with the Treaty of Karlowitz in 1699 once again made Bosnia the empire's westernmost province. The following hundred years were marked by further military failures, numerous revolts within Bosnia, and several outbursts of plague. The Porte's efforts at modernizing the Ottoman state were met with great hostility in Bosnia, where local aristocrats stood to lose much through the proposed reforms. This, combined with frustrations over political concessions to nascent Christian states in the east, culminated in a famous (albeit ultimately unsuccessful) revolt by Husein Gradaščević in 1831. Related rebellions would be extinguished by 1850, but the situation continued to deteriorate. Later, agrarian unrest eventually sparked the Herzegovinian rebellion, a widespread peasant uprising, in 1875. The conflict rapidly spread and came to involve several Balkan states and Great Powers, which eventually forced the Ottomans to cede administration of the country to Austria-Hungary through the Treaty of Berlin in 1878.