Image copyright University of New Hampshire Image caption Robert Morin was described as "a very nice man with a great sense of humour"

A librarian has left $4m (£3m) in his will to the US university where he worked for five decades.

Robert Morin, who died in 2015 at the age of 77, left the sum to the University of New Hampshire (UNH) where he had a job as a cataloguer.

Friends said they were unaware he had amassed a multi-million-dollar fortune from shrewd investments, until he bequeathed it to the university.

This week, UNH officials announced the donation after it had cleared Probate Court.

Savings and investments

Edward Mullen was Mr Morin's friend and financial adviser for over 40 years.

"He was a small, thin, private person but he was a very nice man with a great sense of humour," he said.

Mr Mullen helped Mr Morin with his investments.

"He had a retirement plan, and investments, and just didn't spend any money, so it accumulated," he said.

"He wasn't married and he wasn't close with his two brothers.

"So when his mother died 20 years ago he decided to leave everything to the university."

Mr Mullen said he advised Mr Morin to tell the university about his plans, but he did not want to - a reason, perhaps, why university staff were surprised to hear about the bequest.

Legacy

"Bob's demonstrated commitment to UNH through his philanthropy is tremendously inspiring," said UNH President Mark Huddleston.

"His generous gift allows us to address a number of university priorities."

Some $2.5m will go towards a careers centre for students old and new, and $1m will support a video scoreboard for the new football stadium, a sport in which he had a keen interest.

Mr Morin's dedicated gift went to his former place of work, the Dimond Library, which will receive $100,000.

The money will be spent on scholarships, members of staff who want to continue their studies in library science, and on renovating and upgrading a multimedia room.

The president of the UNH Foundation, Deborah Dutton, described what the donation means to the university.

"Unrestricted gifts give the university the ability to use the funds for our highest priorities and emerging opportunities," she said.

"This is an extraordinary gift that comes at a critical time for launching a number of initiatives that are only able to move forward because of his generosity."