Ibn Battuta was trained as a qadi, a Muslim judge who ruled on matters both religious and civil. He worked as a qadi in various places, including Delhi, the Maldives, and possibly Morocco toward the end of his life. His travels were independent of his occupation, however, and depended on the support of benefactors.