Updated

At least 19 people were injured, four of them critically, when an explosion and seven-alarm fire destroyed an apartment building and burned three other structures in New York City's East Village Thursday.

At an evening news conference, New York City Mayor Bill de Blasio said a preliminary investigation indicated that a gas explosion caused by plumbing and gas work in the building that collapsed was to blame. The New York Post reported that construction crews accidentally "hit a gas main."

Craig Ivey, the president of utility company Con Edison said a plumber had been doing work connected to a gas service upgrade, and inspectors had been there to check on a planned meter installation an hour before the fire. But the work failed the inspection, partly because a space for the new meters wasn't big enough, and the inspectors said gas couldn't be introduced to that part of the building, Con Ed said.

De Blasio said no one had reported a gas leak before Thursday's explosion, and Con Edison said it had surveyed the gas mains on the block Wednesday and found no leaks. But bystander Blake Farber, who lives around the corner, told the Associated Press he'd been walking by the building and smelled gas seconds before the big blast.

Smoke from the fire could be seen and smelled across the city in the hours after the explosion, which occurred at around 3:15 p.m. local time. Flames shot out of the top of the five-story building at 2nd Avenue and 7th Street. Items from a ground-floor sushi restaurant were blown into the street, while the force of the explosion blew a cafe door across the avenue. Rubble, glass and debris littered the sidewalks.

More On This...

    The area was evacuated, and the city's health department advised residents to keep their windows closed because of the smoke. Firefighters continued pouring water on the buildings for hours after the explosion, in an area of old tenement buildings that are home to students and longtime residents near New York University and Washington Square Park. At least one family sought help at an American Red Cross relief center set up at a school.

    In addition to the collapsed building, at 121 2nd Avenue, another building next door was "in danger of possible collapse," according to FDNY Commissioner Daniel Nigro. Two other nearby buildings were affected by the explosion.

    Adil Choudhury, who lives a block away, ran outside when he heard "a huge boom."

    "Already there was smoke everywhere" when he saw the building, he told The Associated Press. "The flames were coming out from the roof. The fire was coming out of every window."

    Area resident Paul Schoengold said he was walking about two blocks away when he heard an "incredibly loud" roar.

    "Then the fire started. I could see the flames on the roof, and they kept getting higher," shooting perhaps 50 feet into the air, he said.

    As freelance photographer Michael Seto ran up to the buildings after hearing the explosion in his apartment a block and a half away, flames were spreading and engulfing one building's first floor.

    Meanwhile, a man was climbing up the fire escape, not down, he said.

    "People were calling to him that the building's on fire — he needs to get down," and he did, Seto said.

    Other witnesses described a woman scrambling down her fire escape in the moments after the explosion. She stopped on the second floor, afraid to go further, before passers-by climbed up to help get her down.

    In the aftermath, one person was lying on the ground, being attended to by two to three passers-by who were holding his head still, Seto said. A woman was sitting on the curb with blood coming down her face, and another woman walked past him with blood on her face, he said.

    The fire happened a little over a year after a gas explosion in a building in East Harlem killed eight people and injured about 50.

    The Associated Press contributed to this report.