Desperate beachgoers formed a human chain to battle treacherous, dumping waves and save a boy swept out to sea.

The 12-year-old was caught by a wave and swept out while playing with a friend at the beach on Napier’s Marine Parade at about 5pm today.

A German tourist went to the boy’s aid but was unable to keep hold of him, a police spokesman said.

The conditions were described as ‘‘treacherous with dumping waves and an extremely strong undertow’’.

A police officer swam out to the boy but was unable to hold him due to the heavy surf. Severol other members of the public also tried to help.

A second officer entered the water and reached the boy, at times losing hold of him as the boy went underwater. He was under for ‘‘considerable periods of up to 20 seconds at a time and fading fast’’, police said.

Members of the public and police then desperately formed a human chain and managed to pull the boy to shore.

He was initially ‘‘unresponsive, physically spent, and could not move unaided,'' police said.

He was moved up onto the beach where members of the public gave him first aid.

Senior Sergeant Mike Stevenson said the actions of the police officers were ‘‘admirable’’.

‘‘The first two officers who braved the conditions - they are extremely admirable and displayed a lot of bravery getting into the surf.

''If they had not done what they had done I’m positive the boy may not still be with us.’’

He said the stretch of coastline was notorious and was characterised by a ‘‘pretty steep drop-off, thumping waves and really strong undertow’’.

About 12 members of the public were involved in forming the human chain as well as four police officers.

The two police officers, who became exhausted by the surf, were also helped to shore.

The boy was taken to Hawke’s Bay Hospital by ambulance and later discharged.

A spokesman for Hawke’s Bay Police said he was proud of the heroism displayed by both the first two officers and the members of the public who helped.