Abdul Malik maintained good relations with the Ottoman government, however he kept Morocco independent from the Ottomans control, and maintained diplomatic relations with the Spaniards to ensure this independence.