Workers doing maintenance at an apartment complex across the Hudson River from New York City accidentally started a fire that caused massive damage and displaced more than 1,000 people, officials said Thursday.

The fire at The Avalon at Edgewater, a complex overlooking the river, was under control but still smoldering Thursday more than a day after it began on the first floor.

At a news conference with Gov. Chris Christie, Edgewater Police Chief William Skidmore said workers doing plumbing work inadvertently started the fire inside a wall. He called the cause of the fire "totally accidental."

"A plumbing repair ignited a fire in the wall which then spread through the building," he said. "It was accidental, there was nothing suspicious about it, and we have complete verification and there's no doubt about it. It was just a tragic accident."

Two civilians and two firefighters sustained minor injuries. Christie called the job done by first responders "extraordinary" and called the lack of fatalities "an enormous blessing."

Before speaking, Christie met with town officials, including the mayor and fire and police chiefs in the auditorium of the Edgewater Community Center, where the Red Cross and others had set up tables where displaced residents could get help finding apartments, medicine and other services.

"We'll be here to help," Christie told one woman as he took a tour shortly after. "I'm sorry for your loss."

Firefighters went door-to-door Wednesday afternoon as flames moved quickly through the 240-unit structure, Fire Chief Thomas Jacobson said. Mayor Michael McPartland said he watched as firefighters pulled three people out of the burning structure, then saw others go back in and rescue a woman "while the facade was coming down virtually on top of  them."

The building's sprinklers were working, but the lightweight, wooden structure fueled the flames and made fighting the fire difficult, the fire chief said.

"It's very difficult because once it's in the walls and floors, we're chasing it," Jacobson said.

The building complied with construction and fire codes, the fire chief said, but he added: "If it was made out of cinder block and concrete, we wouldn't have this problem."

McPartland said approximately 240 units were destroyed and 168 units in a nearby complex were saved. He said schools, which were closed Thursday, would remain closed Friday. He said a fund for people displaced by the fire had been set up at www.gofundme.com/edgewater-fire.

Assemblyman John Wisniewski, a longtime member of a fire safety committee that advises state community affairs and fire division officials, said the common use of engineered lumber that consists of multiple layers of plywood glued together, may be an issue to be examined because that type of wood is less able to withstand fire.

"The Legislature can legislate fire safety provisions, but the preferable option is to let the inspectors and the professionals do an examination of fire scene and come up with their report on the cause and how it spread," he said. "Let's use that to make a case in the Legislature on why we could probably do better in preventing these types of conflagrations."

The Red Cross established a shelter for approximately 500 residents who were permanently displaced from the apartment complex, including New York Yankees announcer John Sterling, and approximately 520 who were temporarily displaced from surrounding buildings, the mayor said.

More than 14 years ago, a fire started at the same location where a five-story condominium complex was under construction and destroyed nine homes and damaged several others. The Aug. 30, 2000, fire forced the evacuation of dozens of nearby residents, including patients at a nearby nursing home. The cause was never determined, although investigators ruled out arson.