Firefighters tackled a large fire in a high-rise building in the Gunwharf Quays area of Portsmouth.
Portsmouth Police tweeted residents took refuge on the roof of the building while awaiting rescue.
People were told to avoid the area as firefighters from Hampshire Fire and Rescue worked to get the blaze on the fourth floor under control.
The fire was put out shortly before 15:00. Hampshire Fire and Rescue tweeted "everyone was safe".
The people on the roof were advised to wait until the smoke had dispersed to come down.
The fire service said it is believed the fire started in the kitchen.
An onlooker tweeted it was "chaos" in the area as the car park at Gunwharf Quays - a waterfront shopping outlet - was closed.
People living in nearby buildings were advised to keep windows and doors shut.