What may be the world's most ancient complete copy of the Torah has been rediscovered in an Italian library, researchers say.

The 12th century Hebrew scroll — which contains the Pentateuch, or five books of Moses — had been sitting in the library of the University of Bologna for centuries, but it long suffered from mistaken identity.

In 1898, a librarian named Leonello Modona labeled the text as a 17th century work, describing it in his catalog as "an Italian script, rather clumsy-looking, in which certain letters, as well as the usual crowns and strokes show uncommon and strange appendices."

Mauro Perani, a Hebrew studies scholar at the university, recently reexamined the scroll for an updated catalog of the library's collection of Hebrew manuscripts. The style of the biblical script suggested it must be much older than the 17th century, Perani thought, possibly more than 800 years old, according to a press release from the University of Bologna.

The unusual textual features that puzzled Modona were another clue. Certain flourishes such as decorative crowns on letters were forbidden after the late 12th century because of rabbinical rules that Maimonides laid out for copying the Pentateuch.

Two separate carbon dating tests — one conducted by the University of Salento in Italy and another by the University of Illinois at Urbana-Champaign — showed that the text was copied sometime between 1155 and 1225, the university said.

The text is hardly the oldest biblical manuscript; that distinction belongs to the 2,000-year-old Dead Sea Scrolls. But it does offer a very rare complete example of the Torah.

"This is important because this is the entire Torah scroll, the most ancient entire scroll that we know of," Perani was quoted as saying by National Geographic. "We have fragments of other Torah scrolls from the Cairo Geniza that date to the same time or earlier, and they show identical styles to this copyist. Maybe we will find another Torah scroll that is older, but for now this is it."

When completely unrolled, the scroll measures 118 feet (36 meters) long and 25 inches (64 centimeters) across. It is set to go on display at the University of Bologna and be uploaded online in a digital format, according to the Telegraph.

Follow LiveScience on Twitter @livescience. We're also on Facebook & Google+.