Dozens of Jewish schoolchildren trapped on a beach by the rising tide were rescued by a helicopter and lifeboats after using their mobile phones as distress beacons.

The 34 strictly-Orthodox teenagers were plucked from a hazardous stretch of the coast with falling rocks after getting lost during a walk on Monday night, the Maritime and Coastguard Agency said.

The hiking party, which included two adults, raised the alarm with Kent Police at around 9pm after becoming disorientated as they followed a coastal path between St Margaret’s Bay and Dover Harbour.

The coastguard launched a search by air and sea involving a helicopter based at Lydd, Dover RNLI lifeboat, two Walmer RNLI lifeboats and Langdon Coastguard Rescue Team. Around 40 volunteers joined the “large-scale operation”.

A spokesperson for the group said: “We are hugely grateful to the coastguard whose swift actions ensured that everyone was returned to shore safe and well. A full internal investigation will be held to ascertain the facts and understand the lessons to be learned.”

UK Coastguard senior maritime operations officer Richard Cockerill said: “The group was advised to switch on their mobile phone lights to help us locate them.

“The group was located by one of the Walmer lifeboats in an area of active cliff falls and also spotted by the helicopter using the forward-looking infra-red camera. All 36 people were recovered to safety by lifeboat and helicopter.”

Shomrim, the Jewish neighbourhood watch organisation operates in north London, said several of its volunteers had gone to Dover to assist the group.

Chaim Hochhauser, supervisor at Stamford Hill Shomrim, said: “Volunteers from Stamford Hill Shomrim were called by a group of people stranded near the Dover cliffs as night was falling.

“Several Shomrim volunteers drove down from London to support the group and liaised with parents and families throughout the incident which thankfully ended well, thanks to the great work by RNLI and HM Coastguard.”

A Coastguard spokeswoman said the group were thought to have descended from cliffs on to the beach before becoming trapped by rising water.

When RNLI teams arrived at the scene they found the group had separated and four students were unaccounted for.

A small craft was launched to pick up the pupils in groups as crews searched for the missing teenagers who were found after shouting to rescuers from the rocks.

By the end of the rescue mission, 31 of the walkers were rescued by lifeboat and taken ashore. The remaining five were lifted to safety by helicopter and flown to the Dover Coastguard station.

All were accounted for by 11pm, the Coastguard said. The walkers were assessed by the South East Coast Ambulance Service, although none required hospital treatment.

Mark Finnis, coxswain of Dover RNLI, said: “The group were caught out by a rising tide. Thankfully the quick and well co-ordinated search and rescue response meant all 36 casualties were rescued and were lucky to escape without serious injuries, but they’ve had a traumatic experience.”

Dover lifeboat station deputy launching authority James Salmon said: “As we approach the summer with lighter evenings, this incident highlights how easy it can be to get cut off by the tide whilst out walking. The group also faced the dangers of cliff falls along this iconic stretch of coastline.

“Surprisingly, the biggest risk when enjoying our coastline can be activities such as coastal walking and running. It’s easy to get caught out by unexpected tides and waves.

“We encourage people to keep themselves safe and treat water with respect by staying away from cliff edges and areas prone to cliff falls, sticking to marked paths and checking local hazards and safety information, such as tide times, before setting out.”