A divinity student at Scotland's oldest university has cracked a religious code that has baffled academics for more than 200 years.

Jonny Woods, a third-year undergraduate at St Andrews, worked out how to read hundreds of pages shorthand notes for sermons left by Andrew Fuller, a leading Baptist theologian.

The 21-year-old, from Coleraine in Co Londonderry, was able to decipher the shorthand after an academic traced a longhand equivalent.

This enabled the student to translate the notes, using the longhand version in the same way that the Rosetta Stone was used as a crib to unlock the secret of Egyptian hieroglyphics.

Fuller, who was born the son of a poor tenant farmer in Cambridgeshire in 1754, became a leader of the British Baptist denomination despite minimal schooling.

He published a hugely influential text called The Gospel Worthy of All Acceptation, which is said to have changed the history of the Baptists, and founded the Baptist Missionary Society.

Such was his international standing, he was offered honorary doctorates by both Yale and the College of New Jersey, which is now Princeton.

The University of St Andrews confirmed Mr Woods has become the first person in the world to read some of the pages in its archives.