In modern times, Vishnu's most popular incarnations are Rama and Krishna. But that was not always the case; in ancient times Vishnu was most popularly associated with his incarnation as Vamana the dwarf. The story of Vamana is told in the most detail in the Puranas, for instance at the end of the Eighth Skanda of the Srimad Bhagavatam. Just to refresh people's memories, the story goes roughly as follows: the Asura (demon) Mahabali, grandson of Prahlada, took over the three worlds by conducting a hundred Ashwamedha Yagnas (horse rituals). Indra went to Vishnu for help, so Vishnu incarnated as Vamana, the youngest son of Indra's parents Kashyapa and Aditi, and then he went to Mahabali's Ashwamedha Yagna. He asked Mahabali for three steps of land, and then he grew gigantic and used those steps to take back the three worlds for Indra and the gods.
The story isn't told in so much detail in older scriptures, however. In the Vedas, Vishnu is famous for having taken three steps, but there's not much detail beyond that. For instance, as you can see in the Rig Veda Anukramani in my answer here, Book 1 Hymn 154 of the Rig Veda is addresses to Vishnu, and here is how it opens:
- I WILL declare the mighty deeds of Viṣṇu, of him who measured out the earthly regions, who propped the highest place of congregation, thrice setting down his footstep, widely striding.
- For this his mighty deed is Viṣṇu lauded, like some wild beast, dread, prowling, mountain-roaming; he within whose three wide-extended paces all living creatures have their habitation.
So there is at least the fact that Vishnu's steps covered the three worlds, but that's pretty much it. My question is, what is the oldest scripture which mentions the demon Mahabali?
The Brahmanas of the Vedas mention the fact that Vamana took the world from the Asuras, but they don't seem to mention which Asuras were involved. Here is what this excerpt from the Aitareya Brahmana of the Rig Veda says, for instance:
[Indra and Vishnu] said "Let us make an arrangement.' The Asuras said "Be it so." Indra said "So much as Vishnu three times traverses, so much be ours; let the rest be yours." He traversed these worlds, then the Vedas, then speech.
The Shatapatha Brahmana of the Yajur Veda also mentions the involvement of these unnamed Asuras:
They then said: "Let us share in this earth along with yourselves! Let a part of it be ours!" The Asuras replied rather grudgingly: 'As much as this Vishnu lies upon, and no more, we give you!' Now Vishnu was a dwarf.... By it they obtained (sam-vid) this entire earth; and because they obtained by it this entire (earth), therefore it (the sacrificial ground) is called vedi (the altar).
The earliest reference to Mahabali I could find is in this chapter Bala Kanda of the Ramayana, where Vishwamitra narrates to Rama and Lakshmana the story of Vamana:
That great resplendent Vishnu then adopting a semblance of a dwarf emerged from Aditi, and that dwarfish ascetic boy approached Emperor Bali, the son of Virochana. That dwarf ascetic boy Vaamana begged and received a space that can be covered in three strides, but strode all the three worlds in those three steps for the purpose of saving worlds, as he is interested in the welfare of all the worlds. Vishnu gave the earth back to Indra restraining Emperor Bali with his vitality. Thus that great resplendent Vishnu made the three worlds to come under the control of Indra again.
So is this the earliest reference to Mahabali, or is he mentioned in any earlier texts? Mahabali's father Virochana, son of Prahlada, is mentioned in verse 22 of this hymn of the Atharvana Veda. So I don't see why Mahabali couldn't be mentioned somewhere in the Vedas as well.