TORONTO (Reuters) - Residents of the Canadian oil town threatened by an out-of-control wildfire can return home, authorities said Saturday, even as they warned the community will have to contend with the blaze for the foreseeable future.

Thousands of residents of Fort McMurray, in northern Alberta, had been ordered to leave their homes earlier this month. But favourable weather made a return home possible.

"With the current and forecast weather conditions, specifically the amount of rain that has fallen on the fire, combined with continued fire suppression and community protection efforts, I am pleased to announce it is now safe for us to end the current evacuation and allow people to return to their homes," said Sandy Bowman, mayor of the Regional Municipality of Wood Buffalo that includes Fort McMurray.

"We thank all of you for your patience, resolve and strength."

Fort McMurray is the hub for most of Canada's oil output. An early start to wildfire season a year after a historically fiery 2023 left some recollecting a devastating 2016 fire dubbed "The Beast" that forced the evacuation of 90,000 residents, burned down 2,400 buildings and idled more than 1 million barrels per day (bpd) of production.

But while conditions are now favourable and the community is not presently under threat, authorities warned they were not yet out of the woods.

The fire "is not yet under control," said Alberta Wildfire information office Josee St-Onge. Fire behaviour will likely increase when sunshine and warm weather return, she added.

"While it is safe for evacuees to return, residents will have to live with an active wildfire near their community for weeks if not months. Bringing a wildfire of this size under control will take time and hard work."

(Reporting by Anna Mehler Paperny, Editing by Franklin Paul)

By Anna Mehler Paperny