Shiva Purana
व्युत्क्रमेणापि मानुष्यं प्राप्यते पुण्यगौरवात् ॥ विचित्रा गतयः प्रोक्ताः कर्मणां गुरुलाघवात्॥ २९॥
Human birth īs attained even out of turn if the merit is weighty enough. As a result of the weightiness or otherwise of the actions, the goals achieved are of diverse nature.
english translation
vyutkrameNApi mAnuSyaM prApyate puNyagauravAt ॥ vicitrA gatayaH proktAH karmaNAM gurulAghavAt॥ 29॥
hk transliteration by Sanscript