Srimad Bhagavatam Canto 10, Chapter 67, Text 02

SB 10.67.2

sri-suka uvaca
narakasya sakha kascid
 dvivido nama vanarah
sugriva-sacivah so ’tha
 bhrata maindasya viryavan
 
Translation: 
 
Sri Sukadeva Gosvami said: There was an ape named Dvivida who was a friend of Narakasura’s. This powerful Dvivida, the brother of Mainda, had been instructed by King Sugriva.
 
Purport: 
 
Srila Jiva Gosvami points out some interesting facts about the ape Dvivida. Although Dvivida was an associate of Lord Ramacandra’s, he later became corrupted by bad association with the demon Naraka, as stated here: narakasya sakha. This bad association was the reaction for an offense Dvivida had committed when, being proud of his strength, he disrespected Lord Ramacandra’s brother Laksmana and others. Those who worship Lord Ramacandra sometimes chant hymns addressed to Mainda and Dvivida, who are attendant deities of the Lord. According to Srila Jiva Gosvami, the Mainda and Dvivida mentioned in this verse are empowered expansions of these deities, who are residents of Lord Ramacandra’s Vaikuntha domain.
 
Srila Visvanatha Cakravarti Thakura concurs with Srila Jiva Gosvami’s view that Dvivida was ruined by bad association, which was a punishment for his having disrespected Sriman Laksmana. Srila Visvanatha Cakravarti states, however, that the Mainda and Dvivida mentioned here are actually the eternally liberated devotees addressed as attendant deities during the worship of Lord Ramacandra. The Lord arranged their degradation, he says, to show the evil of the bad association that results from offending great personalities. Thus Srila Visvanatha Cakravarti compares the fall of Dvivida and Mainda to that of Jaya and Vijaya.
Srimad Bhagavatam Canto 10, Chapter 67, Text 01
Srimad Bhagavatam Canto 10, Chapter 67, Text 03