The captain of the Titanic which sank after colliding with an iceberg in 1912 is believed to have originally failed his navigation test, TV historian Tony Robinson said today.

But Edward John Smith, who famously went down with the ship, was eventually given the all clear and he received his Masters Certificate in February 1888.

He is among the well-known seamen to appear in The Great Britain, Masters and Mates Certificates 1850-1927, which were published today on the family history website Ancestry.co.uk.

The question of what shall we do with the drunken sailor? was a sobering question which puzzled 19th Century politicians and led to the stricter regulation of seamen.

The 280,000 documents, released in partnership with the National Maritime Museum, detail the seamen who passed examinations designed to test their experience and general good conduct, and give evidence of their sobriety.

The system aimed to combat drunk and disorderly behaviour, which was rife in the Merchant Navy during the early 19th century.

Launching the newly accessible records in London today, Robinson, of TV's Time Team, said: "It is believed, for instance, that Captain Smith who was eventually the man in charge of the Titanic when it sank failed his exams the first time round because he did not have sufficient navigating skills."

He went on: "In the mid 19th Century there was an incredible problem in Britain's Merchant Navy which was essentially that all the sailors were getting hammered all of the time.

"It's quite understandable. They were away from their homes for years on end, away from any port for months on end with nothing to do on the ship.

"In addition to that, water went off very quickly. It went brackish and alcohol is obviously quite a robust preservative so they were drinking far more rum than you or I would think to be appropriate."

Robinson added that as sailors began to earn a more generous wage, increasing amounts of money were spent on alcohol.

"In the early 1800s, doctors were becoming much more interested in health generally and they realised that this was a real social problem. There's one doctor that I've read was working on a ship and described one sailor as being so drunk that he had 'lost the ability to look after his personal attention', and somebody else had been drunk non-stop for 10 days.

"So the Victorians documented and recorded all of this and set tests which would ensure that there senior staff were sober and could exhibit good conduct."

Upon passing, men were awarded a Masters Certificate as proof that they were fit for service. Certificates specified the recipient's name, address, certificate number, birth date, birth place, port of issue, examination date and the previous ships on which they sailed.

It was the Mercantile Maritime Act of 1850 that led to the introduction of Masters Certificates by the British Board of Trade and all ranks, from mates to captains, were required to sit these examinations.

After the new law was introduced in 1850, disorderly sailors were quickly forced to clean up their act. Crucially, legislation stated that seamen were no longer permitted to "sell bad drugs", "work under the influence of alcohol" or "fraudulently alter" their Masters Certificates.

Other famous examples of captains who managed to successfully pass their examinations include:

:: Captain George Moodie - Master of the renowned British tea clipper the Cutty Sark, he was awarded his certificate in Fife in 1861 before captaining numerous voyages to India.

:: Sir Edgar Britten - despite running away to sea aged 15, he qualified as a Master in December 1900 and went on to captain the RMS Queen Mary, a large ocean liner that was later used as a troopship carrying Australian soldiers to the UK.

"All of this stuff is hand-written and the ink has faded, often there's very bad handwriting and mistakes are made or rats ate the documents," said Robinson.

"So it's a complex activity, cleaning this up and putting it online but the more people that become interested in family history the more cost effective it becomes."

Ancestry.co.uk international content director Miriam Silverman said: "These records provide fascinating insight into Merchant Navy life at the turn of the 19th Century and signal the end of the stereotypical 'drunken' and disorderly sailor.

They also went a long way to helping the Merchant Navy become respected the world over.

"They are also a rich source of information for anybody looking to find out more about a seafaring relative, or trace the career of a famous captain."

John Sloan has used the newly released documents to learn more about the life of his ancestor, the Merchant Navy's Captain Christen Klitgaard.

"I had a lot of information about him anyway through Ancestry.co.uk, but one of the things I was missing was his Masters Certificate which was a very important document to prove that he was actually a qualified captain."

Captain Klitgaard first went to sea in the 1800s as a cabin boy at the age of 15. From there he progressed through the ranks to the post of Captain, eventually becoming a ship owner.

"He actually ended up spending 50 years at sea and covering one million miles, which was always his ambition," said Mr Sloan.

"During that time he got married and had 10 children, all of whom sailed with him.

"He actually trained at Queen Alexander hospital to become a midwife so that he could be on hand (to help deliver his children)."