The residents of Behrampada slums in Bandra east joined the HDIL security and the fire officials to bring the fire under control.
It took the firemen more than 45 minutes to reach the spot and the locals rushed in to rescue those who were trapped.
"We were outside our houses when we heard a commotion and ran towards the building. We found people stuck inside the basement screaming for help. Two youth were injured while trying to save over 40 persons trapped inside," said Asif Khan, a resident of the area.
Samran Shaikh (20) and Amir Shaikh (18) rushed to the basement to help the trapped people. The door was locked and the guard did not have the keys.
The two boys broke the windows with their hands and opened the door. While breaking the window, they sustained injuries on their hands.
Praveen Vichare, an office boy working on the ninth floor at HDIL, said: "While the fire was spreading upwards, I heard people screaming and realised that something was wrong. Many of us escaped from the staircase."
"I was on the sixth floor when the incident took place. I did not realise anything was wrong until I heard people screaming. Most of us managed to get out of the building through the staircase," another security guard said.