A weekend for winding down summer in Wildwood at the Jersey Shore turned into a mass casualty scene on Saturday night when at least two decks on a three-story rental home collapsed onto each other, the authorities said.

At least 22 people were injured, including an unspecified number of firefighters who had come to Wildwood for the annual New Jersey Firemen’s Convention, according to hospitals and local officials.

The front decks on the second and third floors of a seven-unit condominium collapsed like a “pancake,” trapping multiple people, Chief Daniel Speigel of the Wildwood Fire Department, said on Facebook on Sunday.

Nineteen patients were treated at Cape Regional Health System in Cape May Court House, N.J., and discharged, said Susan Staeger, a spokeswoman. She said three of the victims were children.