Krishna Yajurveda Kanda 2, prasna 1, anuvaka 4
devashcha vai yamaschsminlolespardhanta sa yamo devanamindriyam veeryamyuvata tadyamasya yamatvam te deva amanyanta yamo idamabhoodyadvayagum sma iti te prajapatimupadhavntsa etou prajapatiratmana ukshavashou niramimeeta te deva vaishnavaruneem vashaamaalabhantaindramukshanam tam varunaenaiva grahayitva vishnuna yajnena pranudantaindrenaivaasyendriyamavrunjata
The devas and Yama fought over this world; Yama is the power and strength of the devas. That is why he is called Yama. The gods realized that 'Yama has captured their position.They approached Prajapati. Pajapati created from his body the bull and the barren cow. Devas sacrificed the barren cow to Vishnu and Varuna, and the bull to Indra. This caused Yama to be seized by Varuna and Vishnu. Thus he was driven away.