"There may be (a) possibility people have been trapped inside right now," local police commissioner K.P. Raghuvanshi said Friday.
At the time of the collapse, between 100 and 150 people were in the building. Many were residents or construction workers, who were living at the site as they worked on it, said Sandeep Malvi, a spokesman for the Thane government.
More than 20 people remained missing Friday afternoon and three floors of the building remained to be searched, said R.S. Rajesh, an official with the National Disaster Response Force who was at the scene.
"All the three floors are sandwiched ... so it's very difficult for us," he said.
The dead included 12 children, police said.
A nearby hospital was filled with the injured, many of whom had head wounds, fractures and spinal injuries. Hospital officials searched in vain for the parents of an injured 10-month-old girl who had been rescued.
At least four floors of the building had been completed and were occupied. Workers had finished three more floors and were adding the eighth when it collapsed, police Inspector Digamber Jangale said.
It was not immediately clear what caused the structure to collapse, but Raghuvanshi said it was weakly built. Police were searching for the builders to arrest them, he said.
"The inquiry is ongoing. We are all busy with the rescue operation; our priority now is to rescue as many as possible," he said.
Police with rescue dogs were searching the building, which appeared to have buckled and collapsed upon itself. Rescuers and nearby residents stood on the remains of the roof trying to get to people trapped inside. Residents carried the injured to ambulances and one man carried a small child caked white with dust from the wreckage.
Raghuvanshi said rescue workers had saved 15 people from the wreckage.
Building collapses are common in India as builders try to cut corners by using poor quality materials, and multi-storied structures are built with inadequate supervision. The massive demand for housing around India's cities and pervasive corruption allow builders to add unauthorized floors or build entirely illegal buildings.
The neighborhood where the building collapsed was part of a belt of more than 2,000 illegal structures that had sprung up in the area in recent years, said Malvi, the town spokesman.
"Notices have been served several times for such illegal construction, sometimes notices are sent 10 times for the same building," he said.
G.R. Khairnar, a former top Mumbai official, said government officials who allowed the illegal construction should be tried along with the builders.
"There are a lot of people involved (in illegal construction) — builders, government machinery, police, municipal corporation — everybody is involved in this process," he told CNN-IBN television.
The building that collapsed was illegally constructed on forest land, and the city informed forestry officials twice about it, Malvi said.
A local resident, who did not give his name, said the site was meant to hold a smaller structure and accused officials of turning a blind eye to the problem.
"They made an eight-story building of what was supposed to be a four-story building. People from the municipality used to visit the building but the builder still continued to add floors," he said.
In one of the worst recent collapses, nearly 70 people were killed in November 2010 when an apartment building in a congested New Delhi neighborhood crumpled. That building was two floors higher than legally allowed and its foundation appeared to have been weakened by water damage.