Borrowed from Ottoman Turkish افندی (efendi) (modern Turkish efendi), which was used as a rank of non-European officer in several military forces in colonial Africa.
afande (ma class, plural maafande)