The two young firefighters were trying to control the fire raging in the 13th storey of an apartment block in downtown Shanghai.
Then an explosion rocked the building.
The blast from the explosion was so powerful that the duo were thrown out of the window, and they landed on a platform on the second storey of the building, Shanghai Daily reported.
Mr Qian Lingyun, 23, and Mr Liu Jie, 20, were taken to hospital but died from their injuries, the city's Fire Control Bureau said.
Another firefighter injured during the blaze was admitted to hospital, the report said. No one else was believed to be in the apartment at the time.
Witnesses said the firefighters who died were holding onto each other as they were thrown from the window.
The two men had joined the fire service about two years ago.
Thick black smoke could be seen coming from the apartment windows.
A resident in the building told Shanghai Daily that the firefighters' colleagues were in tears after the incident.
Thousands of messages of sympathy were posted online after the fire authority announced the deaths on its microblog.
There were also angry posts condemning the owner of the apartment and those who had rented it.
"Those who leased the apartment took no care of their own safety and even made two young firefighters sacrifice their lives for them," was a typical comment.
CAUSE OF THE FIRE
The cause of the fire is being investigated.
Some neighbours in the building said there were several tenants squeezed into the apartment. Pictures aired by a TV station showed at least three double bunk beds inside the three-room apartment.
What was left of a moped could be seen among the debris, while another two were parked in the corridor.
Firefighters said there were a number of electrical items plugged into the apartment's sockets and a lot of electric wiring in all three rooms.
Group rentals are a popular way to minimise living expenses, but have been banned by the city authorities due to safety reasons.
This article was published on May 3 in The New Paper.Get The New Paper for more stories.