EMERALD ISLE, N.C. -- Nails deteriorated by years of exposure to the sand, salt and moisture from the ocean gave way, causing a deck collapse that hurt 24 people as they posed for a picture at a North Carolina beachfront home, authorities said.

The deck was likely up to code when the house was built in 1986, but the nearly 30-year-old nails simply fell apart under the weight of the people standing on a small part of the deck Saturday night, Emerald Isle Town Manager Frank Rush said in a news release Sunday.

The pilings of the deck remained in place, and two-thirds of the structure did not fall, he said.

Twenty-four people of an extended family were injured when they fell about 10 feet (three meters) to the ground, authorities said. The ages of those injured ranged from 5 to 94, and five of them remain in the hospital with two still in critical condition, Rush said.

The family at the rental home was from northern Virginia and has asked to maintain their privacy, the town manager said.

The house on Ocean Drive is a 6-bedroom, 5-bath oceanfront home with an elevator and is currently up for sale for nearly $1.15 million. It also is rented through Bluewater Real Estate. An employee at the rental office said Sunday morning that the company had no statement since the investigation is continuing, but sent thoughts and prayers to the family. She wouldn't give her name.

The rental company is co-operating with authorities, and the results of an investigation into the collapse will be made public when finished in the next few days, Rush said.

Emerald Isle Police Chief Jeffrey Waters said an emergency call came in at 6:59 p.m. Saturday and first responders arrived within minutes at the oceanfront home in that barrier island resort community, which was packed with beachgoers for the long holiday weekend.

Fire Chief Bill Walker told The Associated Press by phone that a deck area he estimated to be about 12 feet by 12 feet (3.6 metres by 3.6 metres) gave way.

The injuries ranged from minor cuts and abrasions to more severe injuries that appeared to include broken bones, Walker said.

A specialized mass casualty bus was brought to the home to help get people to the hospital, the fire chief said.

Emerald Isle is one of several resort communities lining barrier islands tucked along the coast of the southeast corner of North Carolina.