About 200 firefighters responded to the blaze that erupted at about 1 a.m. and battled the five-alarm fire for several hours.
A Fire Department of New York spokesman said 23 firefighters and 11 civilians suffered injuries ranging from minor to serious but none was considered life-threatening. He said the number was expected to climb slightly.
He said the flames were so heavy that firefighters were unable to say where the fire originated. That would be part of the investigation into what caused the blaze, he said.
"My life is in there," said Cindy Piscopo, who lived on the first floor of one of the four-family townhouses.
She said she was awakened by a top-floor neighbor knocking on her door and yelling at her to get out.
"I saw fire upstairs and flames shooting out of the side of the building" and an adjacent townhouse, she said. "The top floors are gone from both buildings."
The fire spread to the third building about two hours later, said Piscopo, who escaped safely with her 12-year-old daughter. Firefighters later found her cat behind the building, soaked from the overnight rain.
A neighbor, Anthony DiSimone, said he and his fiancee, Darleen Cerzosie, helped two young children to safety after seeing a man screaming and dangling his young son from a second-floor window thick with smoke.
"The father was stuck up there ... he couldn't do anything - black smoke was just billowing out that window," DiSimone told the Staten Island Advance. "So I went underneath - he threw him right to me and I caught his son."
The man also threw his young daughter to Cerzosie, DiSimone said. The children, believed to be 5 and 3, were treated by emergency officials and seemed to be OK but shaken up, he said. Firefighters were eventually able to get to their father as well, he added.
Associated Press video journalist Ted Shaffrey and photographer Kathy Willens contributed to this report.