According to Islamic religious law, the world is made up of two parts: the house of Islam and the house of war.
This rule came in handy for non-Muslim rulers who lived in the time of the Ottoman Empire, which lasted for more than six centuries. As long as opponents accepted the Ottoman sultan as their superior (and sent tribute, of course), they were considered part of the Islamic world—an arrangement that came with important benefits, such as not getting murdered.
The Ottomans had a reputation of invincibility in the mid-16th century. But changes to the way in which soldiers were paid, advances in the weapons of warfare, and the successes of the Habsburgs and the Russians weakened the Ottomans over time. This may have caused the entire system to malfunction in the 18th century.