Four people were injured and taken to hospital after ferry returning from the White Island volcano in the Bay of Plenty burst into flames.
They were all reported to be in a stable condition.
About 3.45pm, emergency services received their first reports of a ferry ablaze off the coast of Whakatane.
Police said 53 passengers and seven crew were on the 23-metre tourist vessel.
Roger White, who was working at Whakatane Heads, said he saw the incident play out, "probably from about three or five minutes after the motor exploded".
The vessel had turned towards the Whakatane River bar, he said, then slowed down.
"All of a sudden, white smoke came out of all the windows and the top of the boat."
After about 30 minutes, flames were visible from the shore, Mr White said.
He believed the crew dropped anchor and fought the fire before getting the passengers off the vessel.
"They transferred people to the rubber duckie, but they had no secondary boat to go to for about a quarter of an hour. They had two rubber duckies to take all the people out."
Everybody got to shore safely, he said.
The boat, the White Island Tours vessel PeeJay V, was "burnt down to the water line".
Barry Caulfield, who lives at Whakatane Heads, said the passengers were lucky the fire started so close to shore.
"It was just a miracle that that never happened 20 miles out at sea where they had just come from -- just amazing that everybody made it back to shore."
Mr Caulfield added the vessel was just a mile offshore, "so they can be just so grateful that that's where it happened".
He said he had just arrived home when he saw boats going out to help. They had gone out "like a shot", he said. "It's quite scary for the poor people [on board]."
The Bay of Plenty District Health Board said the four injured were a 36-year-old man and a 23-year-old woman from Ohope, a 35-year-old woman from New Plymouth and a 47-year-old woman from South Australia.
Tonight, the owners of the PeeJay V, Peter and Jenny Tait, thanked the authorities for helping to save all those on board.
They also praised their staff and the emergency services for their quick actions.
The couple said they were now helping with the investigations into the cause of the blaze.
"We're extremely upset this has occurred and we are trying to come to terms with it. But we're extremely proud of our crew and staff for their efforts -- and thankful to the emergency responders who assisted in the rescue operation."
They said they had planned and prepared for such a scenario.
They were now helping passengers who have lost personal items on board the vessel.
Two Transport Accident Investigation Commission staff will head to Whakatane tomorrow to look into the circumstances of the blaze.
Tonight, a spokesman said they would speak to the passengers and crew as well as gather information about the vessel itself and its operation. They would also seek to examine the boat's wreckage, if possible.
Police praised the efforts of boaties who answered the call to help rescue the passengers and crew. There was an immediate response, with four large vessels and a Coastguard boat at the scene quickly. They "undoubtedly saved the lives of those on board", a statement said.
The Rescue Co-ordination Centre NZ in Wellington received a mayday call from the blazing boat about 4pm and another call saying all those on board were abandoning the vessel.
The police statement said that in addition to the boats that went out to help, a helicopter had carried out a sweep of the water to confirm everyone had been rescued.
Yvonne Mahy learned about the fire after noticing boats racing out towards the sea to help the stricken ferry.
"We live on the Heads, and we just noticed a couple of boats taking off, and they don't normally go fast down past our house," she said, because it's a slow-boat zone.
"So I went out to have a look and I could see black smoke, and by the time I got to the end of our street there were flames gushing up, and the flames sort of engulfed the whole boat fairly quickly, really.
"It was burning in the back half for a while, and then in probably 15 minutes max the whole thing would have been in flames."
The boat "burned out there for a long time", Ms Mahy said. The flames were "big".
"And you could tell it was the big PeeJay boat because it was a big boat on fire out there.
"Whakatane people are really in a bit of shock because that's our main tourist attraction, and being a passenger boat, we were a bit concerned about the passengers obviously."
Police said the passenger manifest had been checked against those rescued and everyone was accounted for.
The majority of passengers and crew were taken to the Coastguard premises in Whakatane.
The Fire Service assisted ambulance staff as passengers were brought back to shore.
A witness at the scene said passengers were taken into a big shed once they got to shore and given water and woollen blankets.
"Quite a few of them were upset, obviously. A few were international tourists here by themselves without a lot of support."
He said the emergency services had done an incredible job -- and a dive team was even on call to help out.
Many of the people were wet, having jumped off the boat, and were wrapped in blankets wearing just their underwear.
They had since left the shed to return to where they left their belongings at the tour business' headquarters.
The ferry now looked "about ready to go under the water".