Figures obtained by BBC Wales reveal that Welsh hospitals received bequests totalling almost £9 million in the last three years.

The legacies ranged in value from £17.22 to £630,000, the latter of which was bequeathed to help provide for community care and palliative services in parts of Powys.

"Legacies help us provide life-changing equipment, training, projects and research that is not available through the NHS," Kirsty Thomson, fundraising manager for the Betsi Fund, a charity that raises funds for healthcare in North Wales, told BBC Wales.

The bequests can be made in two ways, either by leaving a specified amount in a will or by providing that the residue (the amount left over after all specific bequests are satisfied) of an estate is left to the beneficiary.

There are many reasons for bequests like these. Sometimes it is motivated by a wish to recognise care received by the testator or a member of their family, and sometimes it comes from a desire to help the local community.