The opening pages of a 1659 copy of The Canon of Medicine by Ibn Sina, known to Europeans as Avicenna. Photograph: The British Library Board

Half a million pages of India Office records that shed detailed light on 200 years of British activities in the Gulf are to be digitised and made freely available online.

The British Library announced that the Gulf state of Qatar is providing the £8.7m needed for the project, which will also see some 25,000 pages of medieval Arabic manuscripts – covering science, geometry, astronomy and medicine – put online for the first time.

It is an enormous undertaking: one so big that it will take up most of the library's sixth floor and create 43 jobs on top of a 30-strong team from the organisation's existing staff.

The money from Qatar, while substantial, is a drop in the ocean compared to the £1.5bn it has invested in the Shard, now Europe's tallest building.

The British Library's chief executive, Dame Lynne Brindley, said discussions began two years ago. She added: "We are delighted to announce this very exciting partnership through which absolutely anyone with an online connection will be able to have access to this unique treasure trove of material, illuminating subjects as diverse as tribal and global politics, international commerce and family history."

The library picked out highlights of what will be a three-year project to show the breadth of material to be made available, in both English and Arabic.

Among the India Office records – dating from the mid-18th century to just after the second world war – will be reports by some of the more controversial figures, such as Lewis Pelly, the political resident in the Gulf, who was disliked and thought of as damaging by some; and praised by others for his enthusiasm, intelligence and spirit of adventure.

Also, there will be extraordinarily detailed maps and charts from JG Lorimer's Gazetteer of the Persian Gulf, which was compiled in the early 20th century and represented a crucial reference tool for any Briton working in the region.

"In many ways, [Lorimer] had the same interest as us," said curator Penny Brook, "in that he was trying to pull together information about a complex history and geography and make it understandable and accessible. But there was a crucial difference between the two aims in that Lorimer's was for a select bunch of British officials. It was classified as secret."

In those days, it was all about maintaining British advantage at all costs. Today, the library wants the whole world to have access.

That also goes for the medieval manuscripts, which will include a 13th century Arabic translation of a Pythagorean theorem and Ibn Butlan's The Almanac of Health, written in 1213, which is hugely important because it was translated into Latin and became a textbook in Europe's medical schools.

The library believes the manuscripts will shed light on just how important the Arab world was in terms of global scientific development, and how innovative and ground-breaking some of the discoveries and ideas were.

All the manuscripts and documents have previously only been available by visiting the library's London reading rooms in person. Brook said: "There is still an awful lot to find out from this material, particularly about the Gulf region, which has not been written about as much as other parts of the Middle East.

"There is a real opportunity for people to get in there and do some fresh research. It gives a much more nuanced and interesting picture of that area and Britain's relationship with it."