During this time he became virtual ruler, having confined Sadashiva Raya. Rama Raya removed many loyal servants of the kingdom and replaced them with officers who were loyal to him. He also appointed two Muslim commanders, the Gilani brothers who were earlier in the service of the Sultan Adil Shah as commanders in his army, a mistake that would cost the empire the final Battle of Talikota. Rama Raya lacked royal blood of his own and to legitimize his rule he claimed vicarious connection with two of the most powerful Empires of medieval India, the Western Chalukya Empire and the Chola empire.