All evacuations in the towns of Yarnell and Peeples Valley, some 80 miles northwest of Phoenix, were lifted and state Route 89, which goes through Yarnell into Prescott, 35 miles northwest, was reopened to traffic, the officials said Wednesday night.
Fifteen miles of the 105-mile north-south roadway had been shut down because of the roaring blaze.
Only a third of returning residents trying to salvage what they can have homeowners insurance, KSAZ-TV, Phoenix, reported.
The brutal, wind-whipped wildfire, which consumed some 8,400 tinder-dry acres, or more than 13 square miles, and destroyed at least 114 structures, was declared fully contained Wednesday night.
It was sparked June 28 by a lightning strike in dry brush west of the two towns.
Some 700 firefighters navigated steep terrain, triple-digit temperatures and the tragedy of losing 19 fellow firefighters as they contained the blaze, officials said.
"Every fire in unique," Joint Information Center spokesman Dan Ware told The Arizona Republic. "This fire presented a challenge in that the safety of the firefighters from a mental standpoint had to be focused on."
Remaining fire crews were walking the fire's charred perimeter to ensure the fire lines hold, Ware said. They were also beginning to restore the habitat, he told the newspaper.
Control of the fire is expected to be transferred in the next couple of days to local authorities from the U.S. Forest Service, officials said.
The fire's containment came a day after thousands of people mourned the 19 Granite Mountain Hotshots, who died in the inferno June 30 in what became the deadliest wildfire since 1933 and the largest fire department loss of life since the Sept. 11, 2001, terrorist attacks.
"I don't have the privilege of knowing any of these heroes personally, but I know them," Vice President Joe Biden said at the Prescott Valley memorial.
"I know them because they saved the lives of my two sons when a tractor-trailer broadsided my daughter, my wife and my two sons," he said. "My wife and daughter died. They saved my guys."
Biden added: "There's an old saying: All men are created equal, and then a few became firefighters. Thank God for you all."
Gal Gadot cast as Wonder Woman for 'Batman vs. Superman'
Benedict Cumberbatch's dramatic reading of R. Kelly lyrics is just what you need