Canadian fire crews battled early on Thursday to prevent wildfires from reaching the northern city of Yellowknife, where 20,000 residents are leaving after an evacuation order was declared.

Water bombers flew low over Yellowknife as thick smoke blanketed the capital of the vast and sparsely populated Northwest Territories.

The deadline for residents to leave the city is noon local time on Friday (1800 GMT). The Territories, with a population of just 46,000 people, have limited infrastructure and there is only one road out of Yellowknife to the province of Alberta to the south.

"This fire is approximately 16 km to the northwest of Yellowknife and in the absence of rain, there is a chance it does reach the outskirts ... by the weekend," Mike Westwick, the territories' fire information officer, told the Canadian Broadcasting Corporation early on Thursday. He described Wednesday's evacuation order as very difficult.

Canada is enduring its worst wildfire season with more than 1,000 active fires burning across the country, including 230 in the Northwest Territories.

"We're doing absolutely everything we can first and foremost to slow the growth and prevent that fire from making it to Yellowknife," he added, saying the focus would be on air bombers and getting crews close to the blaze.

Thousands of residents have already fled smaller communities and the hamlet of Enterprise near the Alberta border was almost entirely destroyed by a blaze on Sunday.

In a social media post, the Territories fire service said a fire that had been threatening Hay River, a community of some 3,000 further south on Great Slave Lake, had stalled overnight.

"The territories have never seen anything like this before in terms of wildfire ... it's an unimaginable situation for so many," Westwick said.

The Northwest Territories declared a state of emergency late Tuesday and the Canadian military has been mobilized to help tackle the blazes and airlift some residents to safety.

(Reporting by David Ljunggren; Editing by Devika Syamnath)