A smaller firefighter aircraft nearby managed to dump water and retardant on the flames below.
Emergency Services Minister Stephen Dawson said it is “nothing short of miraculous” that the pilots were able to walk away from the plane.
“We’re very grateful that they are healthy and well,” Dawson said.
“It is a truly remarkable outcome and it’s probably testaments to their skill as pilots.”
Read Related Also: Teenage girl dies after trapped under tram in Sydney's CBD
The Australian Transport and Safety Bureau (ATSB) will investigate.
Chief Commissioner Angus Mitchell said it was “remarkable” those involved survived.
“We are very fortunate to be standing here and not mourning the deaths of some firefighters,” Mitchell said.
He said he hoped to have investigators at the site on Wednesday.