The term asura is so ancient that it has a separate mythology among the Aryans’ cousins in ancient Persia. In the Avesta, the word ahura (asura, Sanskrit) was a positive term that meant the gods. But the ahura were mainly gods of agrarian values, and the greatest ahura was Varuna, the god of the justice in the sense of cosmic order (rita) that a farmer could depend upon to reap what he had sowed. The original meaning of the word asura was “spiritual, divine.”
Even in the Rigveda there was an admission that the asuras were the older brothers of the devas, the gods of the Vedic, or Aryan, peoples. Varuna was the only asura who was honored as a god in the Vedas. For the Aryans the asuras— except for Varuna—had become demons. It was not that they were really evil; they just opposed the devas.
In the later mythology everyone had to have a genealogy; so the asuras belonged to the dynasty of demons, sons of Kasyapa-prajapati born to two of his wives, Danu and Diti. The sons born to Danu were called danavas, and those born to Diti were called daityas. The danavas and daityas together constituted the class of demons, or asuras.
The rakshasas are another class of demons not included with asuras, as they descended from Pulastya, not Kasyapa.