Ajita is overall considered to be the definition of Śṛi (Shri; a respectful way of addressing males in Indian society) Hari [another name for Viṣṇu (Vishnu) or Kṛṣṇa (Krishna)]. Etymologically the word means undefeated and since Viṣṇu (Vishnu) has never faced defeat at the hands of any of his adversaries he is known as Ajita.
During the time of Chākṣuṣa (Chakshusha) Manu, Viṣṇu manifested for the first time. He was fathered by Vairāja (Vairaj) to Devasambhūti (Devasambhuti). This was the time when Kṣīrasāgara (Kheersagar; the mythical ocean of milk) was churned in search of amṛta (amrita; the nectar of immortality). Viṣṇu took the Mandara Mountain, the axle of the churning, on his back transforming himself into a tortoise.
It was actually Brahmā (Brahma) who had meditated for the aid of this indomitable Ajita Viṣṇu for aiding the gods during the event of the Grand Ocean-churning. Being pleased with the ardent meditative prayer of Brahmā, Ajita Viṣṇu advised the gods to enter into temporary truce with the demons so the process of Ocean-churning became comparatively easier through their joint endeavours. He even prophesized how this Ocean-churning would eventually be only profitable to the gods whereas it would bring about deprivation for the demons.