Srimad Bhagavatam Canto 09, Chapter 16, Text 28

SB 9.16.28

gadher abhun maha-tejah
 samiddha iva pavakah
tapasa ksatram utsrjya
 yo lebhe brahma-varcasam
 
Translation by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada: 
 
Visvamitra, the son of Maharaja Gadhi, was as powerful as the flames of fire. From the position of a ksatriya, he achieved the position of a powerful brahmana by undergoing penances and austerities.
 
Purport by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada: 
 
Now, having narrated the history of Lord Parasurama, Sukadeva Gosvami begins the history of Visvamitra. From the history of Parasurama we can understand that although Parasurama belonged to the brahminical group, he circumstantially had to work as a ksatriya. Later, after finishing his work as a ksatriya, he again became a brahmana and returned to Mahendra-parvata. Similarly, we can see that although Visvamitra was born in a ksatriya family, by austerities and penances he achieved the position of a brahmana. These histories confirm the statements in sastra that a brahmana may become a ksatriya, a ksatriya may become a brahmana or vaisya, and a vaisya may become a brahmana, by achieving the required qualities. One’s status does not depend upon birth. As confirmed in Srimad-Bhagavatam (7.11.35) by Narada:
 
yasya yal laksanam proktam
 pumso varnabhivyañjakam
yad anyatrapi drsyeta
 tat tenaiva vinirdiset
 
“If one shows the symptoms of being a brahmana, ksatriya, vaisya or sudra, even if he has appeared in a different class, he should be accepted according to those symptoms of classification.” To know who is a brahmana and who is a ksatriya, one must consider a man’s quality and work. If all the unqualified sudras become so-called brahmanas and ksatriyas, social order will be impossible to maintain. Thus there will be discrepancies, human society will turn into a society of animals, and the situation all over the world will be hellish.
Srimad Bhagavatam Canto 09, Chapter 16, Text 27
Srimad Bhagavatam Canto 09, Chapter 16, Text 29