A librarian from south Wales has been jailed for stealing books and documents including precious records of the 1966 Aberfan disaster in which 116 children died.

Elizabeth McGregor, 57, took hundreds of books from the public library where she worked in Pontypridd and tried to sell them online to help clear her debts.

When she realised she was under suspicion she tried to destroy some of the books she still had by burning them and attempted to get rid of others by putting them into her green recycling bin.

Police found missing titles on sale on her Amazon and eBay accounts, including one entitled Aberfan: A Disaster and its Aftermath, by Joan Miller, a social worker.

McGregor also stole a copy of the report of the tribunal of inquiry set up to examine the disaster, which happened when a colliery spoil tip slid down a mountain and engulfed a village school.

Elizabeth McGregor was given six months in prison for theft and two months for perverting the course of justice. Photograph: South Wales Police/PA

Merthyr Tydfil crown court was told that senior library staff noticed books and other material had started to go missing. When police arrived at McGregor’s home in Hirwaun, near Aberdare, they found hundreds of books including some that had been damaged by fire. Others were recovered from her bin.

Jailing her for eight months, Judge Richard Twomlow said she had stolen in a “calculating and careful way”. He described the material on Aberfan as “valuable in historic and cultural terms”, which, he said, were left “mercifully” relatively undamaged and had been recovered.

He told McGregor: “You were found guilty of the theft of the books. You were also found guilty of setting them on fire or throwing them away. The items you stole were of historic and cultural value.”

Other books she stole covered subjects ranging from natural history to Welsh railway lines. Children’s books and novels were also taken.

Nuhur Gobir, prosecuting, said: “They were of relatively low financial value, but there was additional significant harm.”

McGregor began destroying or throwing away books when her employers began noticing a steady decline of the number of items at the library, but police later found several hundred books at her home.

She claimed she had bought the books from various libraries when they were sold as excess stock. However, a jury found her guilty of theft and perverting the course of justice.

Kathryn Lane, defending, said McGregor was in “significant debt” and feared she was going to lose her home.

Lane added: “She’s a lady in her late 50s who, having had a low level of social interaction for many years, is a lonely individual with her share of physical and mental issues.”

McGregor was given six months in prison for theft and two months for perverting the course of justice.

After the case, Richard Killick, senior prosecutor at the Crown Prosecution Service Cymru-Wales, said: “Any matter involving a breach of trust is very serious. In this case, however, it was twofold in that McGregor breached the trust of her employer and that of the community she served. By taking these books she denied the community the opportunity to benefit from these resources.”