During the Boxer Rebellion in 1900 a fire set off in the uprising in the Hanlin Library in Beijing destroyed copies of one of its most prized treasures: the Yongle Dadian, the world's largest paper encyclopedia, from the Ming Dynasty (1368-1644).
Some of the copies that survived were looted later by the invading Eight-Power Allied Forces from the imperial library of the Qing Dynasty (1644-1911). Exactly how many copies of the encyclopedia were taken remains a mystery.
Among the 300-odd precious ancient books now on display in the National Library of China to celebrate the 110th anniversary of the founding of the library are some of the country's cultural treasures that were eventually returned from overseas.
Two copies of Yongle Dadian, among 67 such books that were returned by governments of the Soviet Union and of East Germany during the 1950s as a token of friendship, are among them. However, water stains mar some of their pages.
"Some copies of Yongle Dadian are now housed in libraries or are in collectors' hands around the world," Zhao Qian, a researcher at the National Library of China, says. "However, the opportunities for their being returned as a result of such intergovernmental cooperation are few and far between."
In 2009 the National Cultural Heritage Administration allocated a special fund to buy one copy of Yongle Dadian at what was said to be "a relatively low price" from a Canadian-Chinese collector. The books was transferred to the national library in 2013.
Zhao, an expert on ancient Chinese books, says that sometimes repatriating the country's precious books is like a race against time. In the world antique's market, ancient Chinese books are a particularly sought-after genre, a set of books sometimes fetching as much as 100 million yuan ($14 million).
"There's a long approval process if a public institution wants to buy a collection," Zhao says. On one occasion, minutes before a private collector was about to seal a deal on one particular book, the institution managed to contact the seller and buy the book.
The National Library of China has inherited former royal collections of books that can be dated to the Song Dynasty (960-1279).
"Perhaps it's a nice home for these books when they return from overseas," Zhao says. "What we really appreciate is that many Chinese auction houses put the national interest first. Whenever they get books from overseas, they usually contact us first to see whether we are keen to have them."
The library began to collect anything that might be regarded as a treasure from overseas shortly after the founding of New China. For example, Chen Qinghua, a banker and a well-known collector of ancient books, left the mainland for Hong Kong in 1949, taking many precious books, including rare Song Dynasty printed versions. His family later migrated to the United States.
In 1956 and 1965 the Chinese premier Zhou Enlai approved spending to get some of them back to China, and in 2004 the library received the rest from Chen's son. Some of the books Chen previously owned are on display in the current exhibition.
However, Zhao says the price of ancient books often makes them unaffordable to the library.
"But if some Chinese collectors can get them back, at least that brings them home."
Three million ancient Chinese books are estimated to be in public or private collections overseas, said Lin Shitian, director of the executive office of the National Center for the Preservation and Conservation of Ancient Books.
"We've undertaken a survey worldwide to establish a database for these books," Lin says, and in it there are about 500,000 entries from 40 public institutions.
Zhao regrets that some books may never return to China, at least physically.
He tells of once hearing about a Japanese collector who wanted to sell some important Chinese books, but when he arrived in Japan to make inquiries he found that the books had been listed as cultural relics that could not leave the country.
"Digitization is one way of sharing resources and beginning cooperative studies."
Thanks to that, 19 copies of Yongle Dadian have come home to the National Library of China from the University of Oxford.