prosperity to many Jewish merchants in northern Moroccan ports, but cost many Jews in the interior their traditional livelihoods, as industrial imports from Europe drove traditional Jewish crafts out of the market. As a result, Moroccan Jews started migrating from the interior to coastal cities such as Essaouira, Mazagan, Asfi, and later Casablanca for economic opportunity, participating in trade with Europeans and the development of those cities. Some impoverished migrants to overpopulated urban mellahs (Jewish quarters) struggled to survive as shopkeepers, peddlers, artisans or beggars. Morocco's instability and divisions also fueled conflicts, for which Jews were frequent scapegoats. The First Franco-Moroccan War in 1844 brought new misery and ill treatment upon the Moroccan Jews, especially upon those of Mogador (known as Essaouira). When the Hispano-Moroccan War broke out on September 22, 1859, the Mellah of Tetuan was sacked, and many Jews fled to Cadiz and Gibraltar for refuge. Alliance Israélite Universelle This incident in the Battle of Tétouan of 1860 was covered by the European Jewish press, which led to an international effort called "The Morocco Relief Fund." The persecution of Moroccan Jews was one of the motives for the foundation in 1860 of the Alliance Israélite Universelle (AIU), a French-based organization working for Jewish social and political equality and economic advancement worldwide. The organization functioned as a Jewish missionary movement that sought to "modernize" the practices of North African Jews. Morocco was one of the countries where the AIU was most active; it opened its first school in Tetuan in 1862, followed by schools in Tangier (1864), Essaouira (1866), and Asfi (1867). Eventually, it had 83 schools in Morocco, more than in the rest of the world combined. Over time, the AIU in Morocco was more and more closely associated with French colonial influence; one of its assistant secretary-generals later noted that its "close, even organic relations with the (French foreign ministry) were an open secret." While the AIU failed to achieve much in increasing Moroccan Jews' political status, it did succeed in giving a significant minority of them modern French-language educations and in initiating them into French culture. This included a transformation of many Moroccan Jews' gender and sexual norms. For many centuries, Moroccan Jews and Muslims had shared such customs as polygamy, segregation of the sexes, early ages of female marriage, and a tolerance for men's love of male youths that was in contrast to both Jewish