The caves from the first period seem to have been paid for by a number of different patrons to gain merit, with several inscriptions recording the donation of particular portions of a single cave. The later caves were each commissioned as a complete unit by a single patron from the local rulers or their court elites, again for merit in Buddhist afterlife beliefs as evidenced by inscriptions such as those in Cave 17. After the death of Harisena, smaller donors motivated by getting merit added small "shrinelets" between the caves or add statues to existing caves, and some two hundred of these "intrusive" additions were made in sculpture, with a further number of intrusive paintings, up to three hundred in cave 10 alone.