A last-minute deal has been struck to stop a "lost" science manuscript from the 1600s - which charts the birth of modern science - being auctioned.
Dr Hooke's manuscript was hidden in a cupboard for 50 years
The hand-written document, by Dr Robert Hooke, contains the minutes of the Royal Society from 1661 to 1682.
It is thought to have lain hidden in a house in Hampshire for about 50 years.
The script was expected to fetch £1m at Tuesday's auction, but an agreement was made for it to be sold to an anonymous bidder on behalf of the Royal Society.
It was discovered in a cupboard in a private house where other items were being valued by an antiques expert.
Dr Hooke accused Sir Isaac Newton of stealing his ideas about gravity
However, it was only when the valuer was leaving that the family, whose identity has been kept secret, thought to show him the manuscript.
The Royal Society, Britain's leading academic institution, had stated before the auction that it had no hope of finding enough money to purchase the manuscript.
However, President Lord Rees of Ludlow had appealed for a "white knight" to buy the document, which contains more than 520 pages of script and some drawings.
On Tuesday - the day it was due to be auctioned at Bonhams in London - a Royal Society spokesman said a payment of about £1m had been made for the manuscript to preserve it for the nation.
DR ROBERT HOOKE 1635-1703
Coined the biological word 'cell'
Helped pave the way for the steam engine
Designed the sash window and the velocipede
Helped to rebuild London after the Great Fire of 1666
Accused Sir Isaac Newton of stealing his ideas about gravity
Lord Rees said: "This is great news for science and great news for Britain."
He said the documents would be put on show to the public and samples were due to be displayed on the society's website.
"We are keen that as wide an audience as possible, including scholars and the general public, should now be able to appreciate these documents," he added.
"We intend to provide digitised versions on our website as soon as possible, and will put the originals on display during our Summer Science Exhibition this year between July 3 and 6."
Dr Robert Hooke, who died in 1703, has been described as the unsung hero of science and "England's Leonardo" and he recorded hundreds of inventions, demonstrations and experiments by leading scientists, but his name is often forgotten.
The script contains the Royal Society minutes from 1661 to 1682
The physicist, chemist, cosmologist, biologist, horologist and mechanic also published the world's first comprehensive illustrated book on microscopy and coined the word "cell".
He pioneered the modern watch, designed scientific instruments and devices, as well as the sash window, the velocipede, and the universal joint used in motorised vehicles.
He also helped pave the way for the steam engine and, with Sir Christopher Wren, was responsible for rebuilding London after the Great Fire of 1666.
However, he often fell out with other scientists accusing them of plagiarising his work.
His most famous feud was with Sir Isaac Newton, who he accused of stealing his ideas about gravity.