having grown up near the mellah , the old jewish quarter which lay close to the walls of the medina and hard by a royal palace of the king , afellay had a natural feel for the people in this part of the city .