Taking advantage of the declining fortunes of the Hoysalas who were attacked by the army of the Delhi Sultans, they tried to create some political order on the banks of the Tungabhadra. They were soon able to set up an independent kingdom. The Vijayanagara empire grew in strength and splendour and resisted all onslaughts till 1565 when the then Vijayanagara commander Rama Raya was defeated by a confederation of Muslim kings and the capital city was ransacked. The broken kingdom came under Mughal rule in 1689 and was later annexed by the Nizam of Hyderabad in 1780. The heartbreak of the 1565 defeat can still be seen in the ruins of the imperial city.
Workmen seem to have fled, abandoning their tools by the side of the river.
There is, in fact so much to discover in Hampi that even a fortnight's viewing may not be enough. But even the traveller in a hurry must find time for a few of Hampi's monuments, if only a few. The historical town and fortress of Anegundi once formed the northern outpost of the Vijayanagara empire. Its ruins which now lie scattered along the north bank of the Tungabhadra River just opposite Hampi, include civil buildings, temples, may lines of fortifications and gateways that seem to be entrances to fantasy land.