The civil war between Huascar and Atahualpa, the sons of Huayna Capac, had been fought out in the meanwhile, and the victorious Atahualpa was at Cajamarca on his way from Quito to Cuzco.
By his will the conqueror left the kingdom of Quito to Atahuallpa, his son by this alliance; while the Peruvian throne was assigned to Huascar, an elder son by his Peruvian consort.
His brother Huascar succeeded Huayna Capac in 1527; for, as Atahualipa was not descended on both sides from the line of Incas, Peruvian law considered him illegitimate.
A jealous feeling soon sprang up between him and Huascar, who insisted that Quito should be held as a dependent province of his empire.
A civil war broke out between the brothers, and, about the time when the Spanish conqueror Pizarro was beginning to move inland from the town of San Miguel, Huascar had been defeated and thrown into prison, and Atahualipa had become Inca.