The Royal Navy Sea King helicopter from HMS Gannet in Prestwick, Ayrshire, was first on the scene.
A Royal Navy spokeswoman said the crew were forced to leave one aircrewman on board the stricken boat following a problem with the rescue helicopter's winch.
The team rescued five stranded crew members before the aircraft developed a defect and Petty Officer Mike Henson was left on board with two remaining seamen. It was Petty Officer Henson's first shift as a qualified search and rescue aircrewman.
All three were later rescued by an RAF helicopter.
For more coverage of the striken cargo ship visit ITV Wales.
An operation to refloat the stricken cargo ship which ran aground in rough seas is due to begin.
Salvage and counter pollution experts are expected to begin assessing the damage to the 82-metre long vessel after it hit rocks near Colwyn Bay in North Wales.
The Marine and Coastguard Agency said the cargo ship was in one piece following the incident, but there are growing concerns that it could begin to leak some of the 40,000 litres of fuel it is carrying.
To hear more about the dramatic rescue from the coastguard visit ITV Wales.
Ray Carson from the Holyhead Coastguard agency has spoken about the successful operation to rescue all crew members from cargo ship that ran aground in North Wales.
Police are meeting with coastguards now. Despite some dramatic pictures, as far as we can see the vessel is still intact. The winchman and 2 crew members who were left on the ship are safe and well. From our perspective as coastguards that's the important part over.
We're delighted we've been able to get them all off board safely. The Maritime and Coastguard Agency which deals with pollution and spillage is on its way to North Wales and ready to inspect at first light.