Two buildings in New York have collapsed in an explosion believed to be caused by a gas leak, killing two people.

More than two dozen people were injured and a search is under way for more feared trapped in the debris, officials said.

They declined to give a number of people still missing.

The blast scattered debris onto nearby rooftops and brought down neighbouring five-storey buildings with a total of 15 apartments.

The incident happened at about 9.30am (1.30pm Irish time) on the largely residential block at East 116th Street and Park Avenue in Upper Manhattan.

Clouds of thick smoke billowed from the rubble of the apartment buildings.

Fire trucks used high cranes to spray blasts of water into the rubble, as dozens of ambulances and police cars swarmed the scene.

Mayor Bill de Blasio, who visited the scene in East Harlem, said preliminary information showed the explosion was caused by a gas leak.

"The only indication of danger came about 15 minutes earlier when a gas leak was reported to [energy company] Con Edison," Mr de Blasio told a news conference just blocks from the site.

"Con Ed dispatched a team immediately to respond. The explosion occurred before that team could arrive. As soon as the explosion was called in the FDNY responded literally within two minutes of the call for help," he added.

Officials at the press conference said the blast occurred 15 minutes after a resident in an adjacent building called Con Edison to complain of a gas odour.

Hundreds of firefighters were scouring the mounds of debris for survivors and trapped bodies.

Crews also scrambled to clean up the debris, which littered nearby train tracks and shut down Metro-North Railroad service, ahead of the evening commute.

Neighbours said they thought an earthquake was shaking them from their beds and breakfast tables.

The explosion, which could be heard from blocks away, shattered windows around the neighbourhood.

US President Barack Obama was briefed on the collapse and sent his condolences to the victims' families and his support to first responders at the scene.