In the fourth incarnation, the Lord became Nara and Nārāyaṇa, the twin sons of the wife of King Dharma. Thus He undertook severe and exemplary penances to control the senses.
Srimad Bhagavata Purana
श्रीमद्भागवतमहापुराणम्
मूल श्लोकः
तुर्ये धर्मकलासर्गे नरनारायणावृषी । भूत्वाऽऽत्मोपशमोपेतमकरोद्दुश्चरं तपः
turye dharmakalāsarge naranārāyaṇāvṛṣī | bhūtvā''tmopaśamopetamakarodduścaraṃ tapaḥ
SB 1.3.9