An evacuation order has been issued for Yellowknife in the north-west of Canada as a wildfire comes closer, with a local minister saying: “The fire now represents a real threat to the city.”

Shane Thompson, the environment and climate change minister for the Northwest Territories, said on Wednesday night that the fire could reach the outskirts of Yellowknife by the weekend and was about 17km away.

Teams were also working to evacuate Hay River, a community of 3,000 on Great Slave Lake, by bus or plane on Wednesday night as the fire approached.

Residents in Yellowknife, the capital and only city in the Northwest Territories, were urged to leave as soon as possible as part of a phased evacuation, with those living along the Ingraham Trail, in Dettah, Kam Lake, Grace Lake and Engle Business District at the highest risk.

Other residents were until noon on Friday to evacuate.

Yellowknife’s mayor, Rebecca Alty, said evacuation flights would begin on Thursday at 1pm and continue until everyone was evacuated.

She stressed that the order was being issued early in order to give everyone enough time for an orderly evacuation.

“It’s being called now, so that we can allow people the opportunity to drive while the highway is still open. The highway is subject to closures at any time. Conditions will be smoky, and residents should drive with caution and care.

“This is an incredibly difficult time for everyone. Please look out and help one another as you can. If you’re driving, and have space, please consider bringing a friend or pets.”

On Tuesday night, local authorities had declared a territory-wide state of emergency and an evacuation order for the outskirts of Yellowknife, a city with a population of 20,000.

“We find ourselves in a crisis situation and our government is using every tool available to assist,” said Thompson.

The town of Enterprise had been 90% destroyed, while the nearby community of Hay River was “running out of time” to evacuate, said mayor Kandis Jameson on Tuesday.

A family escaping from Hay River said their car began melting around them as they drove away after an evacuation order was issued on Sunday.

“It was honestly insane. When I got out of our vehicle in Enterprise, I just cried,” a woman told CBC.

Falling ash and visible smoke were likely in Yellowknife as the 163,000-hectare (402,000-acre) fire spread.

Some people had to be airlifted to safety. One man told a CBC radio reporter that he was sent to an evacuation centre more than 600 miles from home, in northern Alberta. “They’re dispersing us all over the place,” he said.

Yellowknife is roughly 250 miles south of the edge of the Arctic Circle.

This summer alone, Northwest Territories has seen more than 2m hectares burned – a figure that is set to increase, with 236 wildfires currently active across the territory.

July saw the hottest day ever recorded in the far north of the country when Fort Good Hope – a community about 500 miles north-west of Yellowknife – hit 37.4C.

Western Canada is enduring a heatwave that saw 19 daily temperature records broken on Tuesday and is fuelling hundreds of out-of-control wildfires.

In the Pacific province of British Columbia around 80 people were forced to shelter in place in a mountain guesthouse after their only way out was cut off by a rapidly expanding blaze.

The stranded people, including lodge guests and campers from nearby campgrounds, sheltered overnight at the Cathedral Lakes Lodge near Keremeos in the south of the province before being brought down the mountain in vehicles on Wednesday afternoon.

Blazes have engulfed parts of nearly all 13 Canadian provinces and territories this year, forcing home evacuations, disrupting oil and gas production, and drawing in federal as well as international firefighting crews.