During these ancient times, the Balrogs were led by Gothmog, but when Morgoth was defeated in the final year of the First Age, they retreated into the depths again, and this is how Durin's Bane came to be in Moria. While their master was kept prisoner by the other Valar, the Balrogs slept in the pits of Angbad, only to be awakened by the cry of Morgoth's return to Middle-earth, at which time they resumed their servitude, waging war against Elves and Men.
Among Morgoth's earliest servants, the Balrogs were present in Middle-earth long before the One Ring was forged, long before the time of Men, and even before the arrival of the Elves.