A man was seriously injured after falling through the skylight of a roof in Brooklyn early Sunday, officials said.

The 25-year-old man was attending a party in Bed-Stuy at 185 Malcolm X Boulevard when he plunged through the rooftop window at around 1 a.m., officials said. He broke both his legs in the four-story fall, and was conscious and alert when firefighters arrived to remove him from the shaft, the Daily News reports.

EMS personnel then rushed the man to Kings County Hospital, according to officials.

He is expected to survive, and no criminality is suspected. The incident is still under investigation.

The incident is reminiscent of a party fall that occurred in Williamsburg in 2010, when a man attending a rooftop soiree on South Fifth Street fell through a building shaft opening in the roof. He was rescued by firefighters who broke through a first floor wall to save him.