Berlin residents have been told to shut windows and doors after a large forest fire sent a giant plume of smoke across the city, with unexploded munitions from the second world war complicating firefighting efforts.

The blaze, which began on Thursday afternoon, spread quickly overnight to engulf 400 hectares (1,000 acres) of forest between the Brandenburg town of Treuenbrietzen and village of Jüterborg, 39 miles (63km) south-west of the German capital.

Flames lit up the forest as fire crews deployed water cannon and joined helicopters, army and police officers in an attempt to control the inferno.

Fire crews had stopped its spread on Friday night, a local official said, but he warned the danger from the blaze had not yet passed.

“The situation has not yet calmed down,” a spokesman for the interior ministry of Brandenburg state told the DPA news agency.

A fire brigade spokesman told the newspaper Bild: “We can’t get to a lot of places, only the paths that have been cleared and are accessible.”

A firefighter

Firemen work in Treuenbrietzen near Berlin. Photograph: Michael Kappeler/AFP/Getty Images

Large swathes of the forest are considered too dangerous to access on foot, Bild reported, given the danger of unexploded hand grenades and shells, some of which have already been set off by the fire.

More than 500 residents were evacuated to emergency shelters on Thursday as the flames threatened to engulf three villages. Residents were told to bring only vital medicines and important documents.

Emergency services cleared tracks into the forest overnight using wheel loaders. They succeeded in stopping the fire within hundreds of metres of residential buildings.

A firefighter helps to put out a forest fire near Treuenbrietzen. Photograph: Hannibal Hanschke/Reuters

A plume of smoke visible six miles away disturbed Berlin residents when it drifted over the city in the early hours of Friday. Many reported waking up to the smell of burning.

Berlin fire services told Bild that whole streets were blanketed in smoke and instructed residents to shut windows and doors and turn off air conditioning units.

The “whole city area” was affected by smoke, Berlin fire service said early on Friday, adding that due to the smell of burning it was responding to “a great many emergency calls and reports of fires”.

Flights to and from Berlin’s airports were unaffected by the smoke, but one regional railway line and a road were closed.

By mid-morning, fire services reported that they had got the situation largely under control. However, the Brandenburg interior minister, Karl-Heinz Schröter, told Bild it would likely take another few days to entirely quell the flames.