A 17th-century manuscript documenting the birth of modern science has been saved for the nation. With minutes to spare at Bonhams auctioneers in central London, the Royal Society agreed an 11th-hour deal to buy the papers for "about £1m".

The manuscript, penned by the formidable scientist Robert Hooke, is described by Bonhams as "encapsulating the revolution in scientific understanding that marks the beginning of the modern world. Few memorials of the scientific revolution can have greater resonance." The guide price ranged from £1m to £1.5m.

Lord Rees of Ludlow, the president of the Royal Society, said: "This is great news for science and great news for Britain. Robert Hooke was a colossal figure in the founding of modern science, and these documents represent an irreplaceable record of his contribution. They provide an insight into one of the great minds of early modern science."

With tension in the saleroom building, proceedings were interrupted with just 45 lots to go by the Bonhams chairman, Robert Brooks. "Ladies and gentlemen, some news is breaking that I wanted to pass on to you straight away," he said.

"A private treaty sale has been concluded with the Royal Society for the Hooke manuscript and so Lot 189 has been withdrawn from the sale." There was a ripple of applause, but also a few disgruntled faces.

The details of the deal between the society and the owners who found the papers in a cupboard in their Hampshire home are murky, but the Guardian understands there had been feverish negotiations. One source said the society had been in talks with a private benefactor.