The fire broke out on the new battery car track and later, spread to the other stretches. The 'yatra' route was closed as a precautionary measure, the police said.
Fire and Emergency Services personnel, along with the police, officials of the shrine board and locals, finally managed to douse the flames in the morning.
The pilgrimage was resumed subsequently.
Around 40,000 pilgrims were on their way to the cave shrine when the fire broke out. Some of them got stranded till morning. The yatra booking was stopped an hour before the scheduled time last night.