Scientists in Italy have used a piece of code found on the dark web to decipher a 17th century letter written by a Benedictine nun while she was apparently possessed by Satan.

In 1676 Sister Maria Crocifissa della Concezione woke up to find her face covered in ink and a letter she had penned in an incomprehensible mix of Greek, Cyrillic, Arabic and Runic languages.

She and her sisters at the Palma di Montechiaro convent in Sicily believed the message had been delivered by a demon, but they were unable to make any sense of the text.

For centuries, scholars and mystics from across the world would also try in vain to discern the meaning of the letter.

Now, 361 years later, a team from the Ludum Science Centre in Sicily claim to have translated 15 lines of the elusive message. What's more, they used a piece of decryption code found lurking on the dark web.

"Everything's on there: drugs, prostitution, paedophilia, and also programs used by intelligence services to decipher secret messages, like the one we used," Ludum director Daniele Abate told Italian radio 105 Network.

The parts of the Devil's letter that Abate and his team have translated discuss the relationship between God, mankind and Satan. In it, Sister Maria – or whoever had possessed her – encouraged God to abandon man and leave him in the clutches of the devil.

"God thinks he can free mortals," it reads, adding: "This system works for no one".

Modern historians take the view that Sister Maria suffered from schizophrenia or bipolar disorder. She was certainly a talented linguist, demonstrating a mastery of several languages in different alphabets.

Abate said: "My theory was that this is a precise alphabet, invented by the nun with great care mixing symbols she knew. Each symbol is well thought out and structured, there are signs that are repeated, perhaps intentionally or perhaps unconsciously."

Sister Maria is said to have told her fellow nuns that she received two other messages from the devil. But these were never written down or revealed to another soul.