A 12-year-old boy from Wirral on holiday in south Wales was rescued by lifeboat after his dinghy was swept out to sea.
The RNLI said Michael Lally's dinghy was caught by an offshore wind at Trecco Bay, Porthcawl.
His stepfather tried to swim to his rescue but the dinghy was being blown too fast for him to catch.
The Porthcawl RNLI lifeboat was launched and found the youngster in the sea after he tried to swim to shore.
Rescuers brought him back to land where paramedics checked him over.
The incident on Wednesday afternoon was witnessed by other holidaymakers on the beach, who quickly dialled 999 and Swansea Coastguard paged Porthcawl RNLI crew for an immediate launch.
The Wales Air Ambulance was also diverted to the scene with paramedics and Porthcawl coastguard.
Helmsman Alex Denny from Porthcawl said they quickly went to the area where the boy had been seen in difficulty.
"Crew member Jo Missen spotted the dinghy but as we approached and checked it was clear that it was empty.
"Fortunately someone ashore, thought to be the casualty's brother Peter, had seen the boy jump out into the sea and attempted to swim. Peter was then able, via the coastguard, to direct us to where Michael was.
"We quickly brought him on board and proceeded back to the lifeboat station".
Philip Missen, lifeboat operations manager at Porthcawl, said: "This was a life-threatening situation for Michael but thanks to tremendous team work from members of the public, his family, coastguards, paramedics and our lifeboat crew the rescue has been successful and Michael is safely back with his family".
Ian Stroud of the RNLI said: "Michael's mother, Joanne, wanted this rescue to be known about so that it could be a warning to others of the dangers of dinghies and airbeds in open water when there is an offshore wind.
"Today Michael was saved by members of the public dialling the emergency number promptly and the team effort of professions.
"Although cold and frightened at the time Michael was later released from hospital following checks that confirmed he was ok."