Crackers are almost as important a part of the British Christmas dinner as the turkey, pudding and brandy butter.

There's no question that the festive meal wouldn’t feel quite the same without the traditional dinner table accoutrement, and the paper hats, trinkets and terrible puns they contain.

[Read more: Why do we eat turkey at Christmas?}

[Read more: Where did the Christmas jumper tradition come from?]

But when did Christmas crackers first come into being – and why do we pull them on Christmas Day?

When were Christmas crackers first introduced?

Christmas crackers were created in the 1840s by sweet and cake decoration maker Tom Smith. Looking for new ideas, he had travelled to Paris and discovered ‘bon-bons’ – sugared almonds sold wrapped in twists of paper – and imported the idea to Britain.

When the initial popularity of bon-bons started to fade, Smith tried to think of ways that he could restore it – first adding slips of paper with riddles or mottoes into the wrappers. Then one evening while sat by his fire, listening to it spark and crackle, he decided it would be fun if the paper of the bon-bon would make a cracking sound when it was pulled apart.

How did they develop into the crackers we know today?

Smith eventually developed the friction mechanism that would make his invention ‘crack’ when opened, but realised the bon-bon would have to be considerably bigger to fit it. He soon dropped the idea of it containing a sweet at all, but kept the motto and added a trinket or gift.

[Read more: How to make the most delicious Christmas pudding ever]

Renaming his product 'cosaques' – after Cossack soldiers, reportedly for their reputation of firing their rifles in the air as they rode – Smith’s new novelty sold well immediately. But when he found that a rival manufacturer was going to bring out his own version of the cosaque in time for Christmas, he decided to act.

He quickly designed eight different kinds of cracker, worked his staff day and night and distributed stocks throughout the country in time for the Christmas holiday. The cosaques quickly became known colloquially as crackers, after the sound they made – and the new name stuck.

Why are crackers pulled at Christmas?

Crackers weren’t specifically meant only for Christmas – in fact, Smith’s company would have great success creating ‘themed’ crackers for different groups of people and to reflect current trends. But as their popularity had first come at Christmas, and perhaps because they contained gifts, they became associated with the festive season.

Smith died in 1869, and his sons took over the business. They continued to develop the cracker, eventually adding paper hats to the contents. These also added to the cracker’s association with Christmas – the tradition of wearing festive hats is believed to date back to the Saturnalia festival of Roman times, though the crown-like shape of the hat may stem from Anglo-Saxon Twelfth Night celebrations, when a ‘King’ or ‘Queen’ was appointed to take charge of proceedings.

[Read more: Brussels sprouts inspire post-Brexit cracker joke]

Tom Smith still makes more than 50 million crackers every year, and holds the Royal Warrants granted by the Queen and the Prince of Wales, an association that dates back to 1906 with the granting of its first warrant by the then Prince of Wales, later King George V.