A heating and air-conditioning unit weighing several tons came untethered from a crane and fell 30 stories to the ground in Midtown Manhattan on Sunday, leaving seven people scraped, bruised and shaken up, officials said.

The equipment came tumbling down at 10:43 a.m. on a stretch of Madison Avenue, officials said. Had it happened on a weekday, when the area is typically bustling with pedestrians and motorists, the consequences might have been worse.

“We lucked out on this,” Ronald Spadafora, an assistant fire chief, said at a news conference with Mayor Bill de Blasio and other city officials.

Even for a Sunday, the area was quite active. Nearby, a parade celebrating Israel’s independence was marching along Fifth Avenue. Mr. de Blasio took part in the festivities.