In 1511, the Templars bribed Hafsid King Muhammad IV to allow only Templar-approved merchants to bring goods into the markets of Tunis. However, these bribes were stolen by Ottoman Assassins sent from Constantinople by the Italian Assassin Mentor Ezio Auditore, and put to other uses. Some time after, the Templars manipulated Muhammad into imposing quotas and mandates on local farmers that served the Templars' goals. However, the Assassins protected the farmers and eliminated the King's extortionists. Later on, the Templars bribed corrupt Hafsid ministers in exchange for loosened restrictions on imports and exports. However, the Assassins eliminated the most corrupt ministers and sent a message that corruption would be repaid with retribution. Eventually, the Templars were expelled them from the city.
By the 16th century, Tunisia was primarily inhabited by the Berber people. Tunisia's coastal region was part of the Barbary Coast, a region rich in gold, ivory and pepper. As a result, it attracted the interest of several imperial powers and trade routes were soon established, leading to a dramatic increase in piracy.