Enormous explosions at a chemical warehouse in a major Chinese port city have killed at least 50 people and injured more than 700, leaving a devastated landscape of incinerated cars, toppled shipping containers and burnt-out buildings.
There are also fears toxic chemicals have been released into the air.
The blaze was brought "under initial control" on Thursday afternoon, state news agency Xinhua cited the public security ministry as saying, after 1000 firefighters and 143 fire engines had been deployed to the site.
A 217-strong specialist nuclear, bacteriological and chemical warfare military unit arrived to help with the clean-up operation, Xinhua said.
But officials were unable to say what triggered the initial fire or the subsequent explosions.
Xinhua described the facility as a storage and distribution centre of containers of dangerous goods, including chemicals.
Wen Wurui, head of Tianjin's environment protection bureau, told a televised briefing that "poisonous and harmful" chemicals had been detected in the air.
He said they were not at levels "excessively high above standards".
But environmental campaign group Greenpeace warned that substances from the site could be dangerous, saying it was "critical" that the potential toxins in the air were monitored closely.
An AFP reporter in Tianjin saw shattered glass up to three kilometres from the site of the blasts, where the detonation unleashed a vast fireball that dwarfed towers in the area, lit up the night sky and rained debris on the city.
The explosions were felt several kilometres away, even being picked up by a Japanese weather satellite, and images showed walls of flame enveloping buildings and rank after rank of gutted cars at an import facility.
"When I felt the explosion I thought it was an earthquake," resident Zhang Zhaobo said. "I ran to my father and I saw the sky was already red. All the glass was broken, and I was really afraid."
Residents, some partially clothed, ran for shelter on a street strewn with debris.
"I heard the first explosion and everyone went outside, then there was a series of more explosions, windows shattered and a lot of people who were inside were hurt and came running out, bleeding," said 27-year-old Huang Shiting, who lives close to the site.
Paramedics stretchered the injured into the city's hospitals as doctors bandaged up victims, many of them covered in blood.
Citing rescue headquarters, the official Xinhua news agency said 50 people had been killed, including at least 12 firefighters.
Scores of firefighters were already on the scene before the explosion, responding to a fire,
At one city hospital a doctor wept over a dead firefighter still in uniform, his skin blackened from smoke, as he was wheeled past along with two other bodies.
Xinhua said 701 people were hospitalised, 71 of them in critical condition.
Mei Xiaoya, 10, and her mother were turned away from the first hospital they went to because there were too many people, she said.
"I'm not afraid, it's just a scratch," she said pointing to the bandage on her arm. "But mum was hurt badly, she couldn't open her eyes."
Plumes of smoke still billowed over buildings hours after the blast, which occurred shortly before midnight local time.
"Of course I was afraid, how can you not be afraid?" said a man as he looked at his apartment block from behind a police cordon. "I ran. I grabbed my child and my wife and ran."
Tianjin, about 140 kilometres southeast of Beijing, is one of China's biggest cities, with a population of nearly 15 million people, according to 2013 figures.