A group of passers-by broke down flat doors and rescued two people sleeping inside when they spotted a fire in the buidling.
A woman, 30, and three men noticed flickering and heard a smoke alarm going off inside a flat window in Gladstone Court, Staincliffe Road.
They broke down both the outside and flat doors of the building, waking a woman, 37, and a man, 28, and leading them to safety.
Two crews from Dewsbury fire station arrived to tackle the fire, which may have been caused by a chip pan, at around 12.50am this morning (Saturday).
The two people rescued from the flat, as well as the woman who helped break down the doors, suffered slight smoke inhalation and were transported to hospital by ambulance, after receiving oxygen therapy on the scene.