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. But they allowed some of the Bosnian tribes to immigrate into the Arabian countries (Palestine, Jordan). The following hundred years were marked by further military failures, numerous revolts within Bosnia, and several outbursts of plague.