Temple story
Daksha held a great yagna and purposely did not invite Lord Shiva, to insult him. In anger Shiva sent Veerabhadra, who broke up the yagna. At that time Sage Mandavya was doing penance here, praying for a darshan of Veerabhadra, and Veerabhadra appeared to him in that fierce form. The sage prayed to Ambika to soften him; she came as Bhadrakali and cooled him, and at the sage's request both stayed at the place of his penance, which is now Rayachoti. A king later built the temple.
Source: AP Endowments (aptemples.ap.gov.in), Rayachoti Deities · checked 28 Nov 2026