The history of the disposal of objects from museum collections is littered with scare stories and infamous cases. Did you hear the one about the local authority museum forced to sell an old master painting to plug the council's budget deficit? And what about the art gallery that flogged a painting to fund a burglar alarm?

It seems like every time the 'D' word is dropped into conversation in museum circles, it's not long before someone rakes up their favourite tale of a fabulous collection chucked out on a whim, or a painting - now worth millions - dumped for a few quid when the artist wasn't in fashion.

But are these just isolated examples of governing bodies putting cash before collections and curators making errors of judgement?

Over the past 50 or so years, there have been huge changes in the way museums manage their collections. The implementation of professional standards such as accreditation, and the development of ethical guidelines, have transformed the way museums operate. But it wasn't always the case that every decision to deaccession from a collection was as cautiously ruminated over as it is today.

The second world war marked a brutal turning point for museums in the UK. Although the nationals and some local authority museums were able to safeguard their most important pieces by shipping them off to underground stores in the Welsh mountains and beyond, other collections had to sit it out. A number of city centre museums sustained damage or took direct hits including ones in Leeds, Hull, Birmingham, Bristol and Liverpool. And the impact went far beyond damage to the fabric of the buildings.

In Leeds, one of only three bombs that fell on the city went straight through the roof of the museum. So after the war, staff not only had to cope with a clean-up operation, but also an administrative mess in terms of missing collection records and documentation.

The post-war confusion, damage to collections and buildings, and shortages of staff, coincided with a change in direction for local museums. Until then, many had seen themselves as mini-British Museums - collecting a bit of everything, from ethnography and natural history to Egyptology and art.

At the turn of the 19th century even small museums were able to subscribe to foreign expeditions - in effect sponsoring them for a share of the booty on their return.

But after the war individuals weren't collecting in the same way and museums lacked the money to add to their collections. The austere climate meant that most museums in the 1950s and 1960s had little or no acquisition budget and it was the start of changes in what it was considered important to collect.

Museums began to acquire social history objects that reflected an awakening interest in the subject among curators and the population as a whole. Museums also began to define their collections along geographical boundaries.

The impact of this was what could be described as the great post-war giveaway. Barbara Woroncow, a past president of the Museums Association (MA), says that ethnographic collections suffered in particular, especially in Leeds.

In the early 1950s, K Webster, a dealer purporting to be collecting Maori material on behalf of the New Zealand government, approached the Leeds City Museum. Webster was reportedly given a free run of the collections and took not only Maori items, but also virtually all the Pacific material and some of the best American and African material. A member of staff described a 'pantechnicon' of objects being taken away in exchange for a 14th-century Nottingham alabaster.

To make matters worse, Webster kept a lot of the material and sold the rest on the private market. (Ironically, he eventually bequeathed some of the Maori material to museums in New Zealand. So, despite the delay, the objects ended up where they were intended - no thanks to the trustees of the Leeds City Museum.)

Woroncow says that this picture was repeated at a number of museums and attributes it to, among other things, a devaluing of ethnographic collections. Stories of collections ending up disposed of on bonfires and down disused mine shafts, or of children's Saturday clubs playing with bows and arrows from the collections and of objects being used as props by the local amateur dramatic society are not uncommon. 'There was no understanding of their wider importance - they were out of fashion and misunderstood,' Woroncow says.

This junking and sale of objects wasn't limited to ethnographic collections - natural sciences suffered too with the destruction of large taxidermy because of the lack of storage space - and Victorian paintings also became the victims of fashion whims.

Maurice Davies, the deputy director of the MA, says two factors were at play: 'Museums were getting rid of stuff that was deemed unfashionable, such as 19th-century paintings and ethnography, and there was also pressure to raise money through sales.'

Unfortunately, the couple of hundred pounds raised at auction often proved a paltry amount compared with the worth of the paintings in later years. Christopher Wright, an art historian, cites many examples in his recently published book, British and Irish Paintings in Public Collections, of what he describes as the decimation of public collections of Victorian art. And he says that cashing in on the potential value of the paintings was often not the motive. 'There are very few examples where it was done for money. Mostly it was a question of taste and nearly always you find that there was a rogue curator involved.'

This trend for disposal by sale continued throughout the 1950s, 1960s and 1970s. In effect, museums were trading in the same way that a private collector or dealer would. But institutions getting rid of their collections in this way didn't meet with unanimous approval.

In 1973, a resolution at the MA's annual conference expressed 'grave concern' regarding the 'continuing loss from the public domain of important scientific, historic and artistic museum specimens through their sale by public auction'. The resolution asked the MA's council to seek the help of the Standing Commission on Museums and Galleries to 'safeguard the cultural heritage of the British nation'.

The growing anti-sale tendency coincided with a number of other changes in the museum world. In 1974, the MA established a set of minimum standards for museums. These new standards for institutions were mirrored in the development of a different sort of professional training for the sector with the advent of the museum studies masters degree in the late 1960s.

At around the same time, the newly formed Museum Assistants' Group began to lobby for a uniform set of ethical standards for museums - as a result, the MA's ethics committee was created. The breakthrough came in 1977 with the adoption of the Code of Practice for Museum Authorities that included a 'strong presumption against disposal'.

Tristram Besterman, a former chairman of the MA's ethics committee, says the next major step forward came when the Museums and Galleries Commission (MGC) developed the registration scheme in 1988. The MA's ethics committee persuaded the MGC to adopt the sections on ethical acquisition and disposal verbatim. 'This was important because for the first time it gave ethics teeth - it was a way to make it stick,' says Besterman. 'In effect it meant that a museum in breach of the code could lose its registration.'

This almost defensive attitude to collections was a reflection of the political climate in the late 1980s and 1990s. There was a feeling that the Thatcher government wasn't interested in the arts or museums and a fear that collections were just another asset to be realised if and when necessary. 'We had a government that knew the cost of everything and the value of nothing,' says Besterman.

The publication of a consultation on disposal from national museums by the Office of Arts and Libraries in 1988 only served to strengthen these fears. According to Davies at the MA, although the tone was neutral, there was suspicion that it was part of a 'Thatcherite plot to widen the powers of sale and squeeze museum grants'.

In the end, opposition, in particular from the trustees of national museums, prevented changes to legislation. But at the beginning of the 1990s, another case added weight to the argument of those opposed to sale, and proved the power of the new guidelines.

In 1991, Derbyshire County Council sold 16 paintings from the collection of the Buxton Museum and Art Gallery to help plug its budget deficit. The move caused outrage and led to the council being expelled from the MA and de-registered by the MGC.

Although the fear at the time was that other cash-strapped councils would follow suit and that cultural asset-stripping would become the norm, the general condemnation that the council faced seemed to quell any copycat behaviour. But that's not the end of the story.

As museums and their stores grow fuller, there have been moves to rethink the rules on disposal. In 2003, the National Museum Directors' Conference produced its Too Much Stuff? report, which concluded that disposal should be regarded as an integral part of collection management, but that it needs to be properly resourced and carefully conducted.

And this year the MA launched a consultation on disposal that asks whether a less restrictive principle than a 'strong presumption against disposal' should be adopted.

Whatever the upshot of the consultation, as the recent case of Bury Metropolitan Council planning to sell a Lowry painting proves, no voluntary code or set of guidelines can prevent disposal when the governing body is determined to go to the sales.