Britain was the first country in the world to start a welfare charity for animals, as early as 1824. Now, almost 20m cats and dogs have a loving place in the country’s homes, and almost one in two households is accompanied by a furry, scaly, or feathered friend.

As a historian of family and home life in 19th- and 20th-century Britain, I’ve been trying to find out how this came about. With Julie-Marie Strange and our research team, Luke Kelly, Lesley Hoskins and Rebecca Preston, we’ve been exploring archives from the Victorian era and beyond to figure out how and when pets became so prominent in family life.

Humans have interacted and engaged with animals for thousands of years, but pet-keeping didn’t become socially acceptable in Britain until the 18th century. Until then, pets were often seen as an elite extravagance, and small dogs frequently appeared in satirical prints of aristocratic ladies, symbolising frivolity and indulgence.

By the late 18th and early 19th centuries there were fewer of these kinds of images. Instead, paintings and illustrations – a good indicator of what was culturally “in” – began to portray pets as an accepted part of domestic life.

In part, this was because of the new emphasis Victorians placed on home and domestic life. Responding to the growth of noisy and dirty industrial cities, Victorians began to idealise the home as a sacrosanct space. Pets were a key part of this celebration of domestic life, appearing in numerous paintings and illustrations and often portrayed as part of the family. This was the clear message behind Frederick George Cotman’s painting, One of the Family, which shows a rural family at the dinner table, accompanied by a pet dog and a horse.

In tandem, a rising Evangelical religious movement placed more emphasis on mothers and fathers in bringing up moral children. In this cultural climate, pet keeping took on a new moral value. From the 1840s, advice books and children’s literature encouraged children to keep small animals such as rabbits, guinea pigs and birds. The idea was to cultivate commitment, caring values and practical skills. Boys in particular were expected to learn kindness from these activities.

Victorians kept pets for a variety of reasons. Pedigree dogs conveyed class and status, cats caught mice, and rabbits could be eaten when times were hard. But evidence from interviews, diaries, photographs and the numerous newly created pet cemeteries suggests that, above all, emotional attachment was a crucial part of the relationship between most Victorians and their pets.

Dogs, for example, were held to have virtuous characteristics that echoed the values of the Victorian human world – they were seen as steadfast, loyal and courageous. In the popular painting by Briton Riviere to the right, a little girl, perhaps banished to the naughty step, is accompanied by a faithful dog.

While the Victorians celebrated pets, there was less consciousness of the harm that might be caused to animals by removing them from their natural habits. Mice, rabbits, squirrels, hedgehogs and all kinds of British birds regularly featured in advice manuals as animals that could be captured and tamed.

Hedgehogs, for example, were frequently captured and sold at London’s Leadenhall Market. Their willingness to eat black beetles made them valuable in London kitchens as they were thought to improve cleanliness. But as how to care for and feed them was not well understood, they tended not to survive for long.

Birds played an important part in working class culture. Though some families kept them in poor conditions, most cared for them fondly, valuing the song, movement, and colour they added to home life. Removing them from the wild was more contentious than other animals – in the 1870s, legislation was passed to limit their capture to certain times of year. However, markets trading in wild birds continued to operate well into the 20th century.

Taking animals directly from the wild became gradually less acceptable in the 20th century. Changes in living conditions in the early 20th century also altered the way people kept domesticated pets. The building of new suburban houses with larger gardens in the interwar period created a new, more spacious environment for animals. An increasing urban population was encouraged to take in pets that didn’t mind living exclusively indoors, such as pedigree cats.

Disposable incomes rose, so there was also more money for people to spend on their companions. After the Second World War, vet services grew, as did companies supplying bespoke food, toys and pampering experiences.

A stronger emphasis developed on building a relationship with pets, rather than simply caring for them. From the 1920s, commentators increasingly wrote of relationships between humans and pets, and of training as an important facet of dog ownership.

By the 1950s, popular animal experts like Barbara Woodhouse were emphasising that owners also had to be trained. Woodhouse argued that “delinquent canines” – dogs that stole Sunday joints, occupied the favourite chairs of owners, or refused to move from their beds – were due to the failings of owners who had not forged meaningful relationships with them.

By the late 1950s and early 1960s, academics had started exploring the significance of pets in family life. Sociologists Harold Bridger and Stephanie White argued in 1964 that the decline of the traditional “close-knit” family made pets more necessary to bind families together. They predicted that pets would keep becoming more popular long into the future. The booming pet culture in the 21st century appears to fulfil that prophecy.

This article was originally published on The Conversation