A 34-year-old man “doused a room with gas and lit it on fire,” causing the Hamilton Heights blaze in November that injured nine people and left more than 35 families without a home, prosecutors said.

Jelani Parker brought a red gas can up to the sixth-floor apartment at 565 W. 144th St., where he lived with his parents, on Nov. 17, 2017, the Manhattan district attorney’s office said. After he poured out the gas in one of the rooms and started the fire, he was seen on video leaving the building as the flames spread.

He initially fled to North Carolina, and then to Los Angeles, where he was arrested, prosecutors said. He was brought back to New York City and has been charged with arson, assault and reckless endangerment.

“This reckless act threatened the lives of nearly 150 residents and more than 200 Firefighters who bravely battled it for hours,” FDNY Commissioner Daniel Nigro said in a statement.

About 255 firefighters and paramedics responded to the six-alarm fire, which left the 50-unit building heavily damaged. One civilian, seven firefighters and one police officer suffered minor injuries, authorities said at the time.

A Department of Buildings vacate order remains in effect for the building.