The Avatar of the Buddha Gotama - Agni Purana 10.3

A long time ago, there was war between the Devas and Asuras. The Asuras managed to defeat the Devas, who in defeat sought the protection of Vishnu. Vishnu assured them, Vishnu would manifest as a Buddha, the son of Shuddhodana. As a Buddha, Vishnu would restore the Dharma: then, all the Asuras, indeed all beings, would become Buddhists and live contentedly in their own worlds (lokas), at peace. The Asuras would return to Naraka, and the Devaloka would be restored to the Devas. Vishnu would manifest as a Buddha at the end of the age of Kali, when all people will have lost the path of the Vedas. They will have become criminals, violating their duties - and concerned only with Artha, disregarding Dharma and Kama, they will have become robbers. When even the Kings neglected their own laws, they will have begun to devour each other.

Once the Dharma was restored and all the worlds were at peace, Vishnu would manifest as the son of Vishnuyasha. The sage Yajnavalkya would be Vishnu's priest, and the four Ashramas and four Castes would be restored when all beings begin to again venerate the sanctity of words, and become righteous. This will utterly destroy all doubt and unbelief. This will be the dawn of the Satyayurga.

Vishnu then reminded the Devas that it was their duty to heed the teachings of Vishnu's avataras, if they wished to return to heaven (devaloka).