after the death of kapilendra deva gajapati in 1466, there was a fight between his sons hamveera deva and purushottama deva for succession. hamveera succeeded in occupying the throne with the help of bahmanis but he could not retain it for long. purushottama overthrew hamveera and tried to reconquer rajamahendravaram and other places. but muhammad shah iii led the forces to rajahmundry. this battle, however, ended with the conclusion of a peace treaty. after the death of muhammad shah iii, purushottama gajapati overran the whole of the godavari-krishna do-ab and drove the bahmani forces as far south as kondaveedu. purushottama was succeeded by his son pratapa rudra. the vijayanagar monarch krishna deva raya invaded his kingdom and brought rajahmundry under subjugation. however, a treaty was concluded wherein pratapa rudra agreed to give his daughter in marriage to krishna deva raya in return of the territory north of the krishna conquered by krishna deva raya.