Queen Margrethe II of Denmark.

Queen Margrethe II of Denmark. Photo: Getty Images

Backstage at the Tivoli theatre, someone was rustling around the Christmas tree. Tinsel was being tweaked, baubles adjusted and presents primped as the set designer ensured that everything was perfect before it was time for the curtain to rise.

''And then I remembered that the woman crawling around the Christmas tree was actually the Queen of Denmark,'' says Michael Revie, a ballet dancer from Northern Ireland, who is dancing the role of the prince in The Nutcracker. ''It was quite surreal.''

Queen Margrethe, who celebrated 40 years on the Danish throne this year, has designed all the costumes and the set for the ballet, which opened in Copenhagen on Thursday.

The classic, with its instantly recognisably music by Tchaikovsky, tells the story of a young girl who falls asleep after a Christmas Eve party to dream about a magical kingdom, with dancing rats, swirling snowflakes, the Sugar Plum Fairy and her toy nutcracker transformed into a handsome prince.

For the past two years Queen Margrethe has been immersed in every aspect of the production, from sketching each costume individually - she is a celebrated artist who has exhibited her work under a pseudonym in galleries - to designing the set and correcting the scriptwriter and choreographer on historical inaccuracies. ''One draws on whatever one happens to know about,'' she says, modestly. ''Obviously I've done some research.''

Is her involvement a way of proving that she can exist beyond ceremonial duties - and have a life beyond the palace walls?

''I think perhaps it has become that way because I like doing things, painting, making things,'' Queen Margrethe, perched on a hastily-arranged chair in the foyer of the theatre in a brief moment of calm between rehearsals, tells The Sunday Telegraph.

In her tweed skirt suit, brown polo neck and bright red lipstick, she resembles an authoritative librarian rather than a queen. Small silver earrings, showing the twin dramatic masks of comedy and tragedy, hang from her ears. Two protection officers watch discreetly from afar.

''I have gradually become more involved in many more things. I suppose it is slightly mad to accept to do a production like this, but I think the madness is on both sides,'' she says, laughing.

The directors wanted to make the production feel very Danish, with the Kingdom of Sweets replaced by Copenhagen's Tivoli gardens and Hans Christian Andersen giving out the presents on Christmas Eve.

''The whole concept of doing it here in Tivoli appealed to me,'' she says. ''The idea of doing a Nutcracker, which was specifically Danish.

''It wasn't about being absolutely accurate - but certainly not presenting something that people would say, 'That could never have happened.'

''There was at one point the idea of putting a certain famous person in Copenhagen at that time into the play, we had thought of putting her in. And I said that would never have happened as she couldn't stand Hans Christian Andersen. So that is the sort of thing you simply have to avoid. We may have made some other wonderful gaffes, but we did try.''

That a reigning queen should roll up her sleeves and get stuck into theatre production certainly seem strange to a British audience. Queen Margrethe is the head of the oldest continuously reigning monarchy in Europe and is able to trace her lineage back to a Viking ruler, Gorm the Old, who became king in AD936. Like Queen Elizabeth, she is a great-great-granddaughter of Queen Victoria.

Unlike the queen, however, she studied at some of Europe's most rigorous academic institutions - gaining a degree in archaeology from Cambridge, studying politics at Aarhus University in Denmark, followed by the Sorbonne in Paris and the London School of Economics.

But it is to the arts that she devotes much of her time. In addition to attending almost every ballet shown in Copenhagen - sometimes seeing the same production three times - the 72-year-old Queen Margrethe also has, for the past 30 years, taken weekly ballet classes with a group of her childhood school friends. When approached by the arts director Peter Bo Bendixen, a former dancer at the Royal Danish Ballet, she confesses that she ''was very easily caught'' by the Nutcracker project, which involved designing more than 100 costumes and four large stage sets for a cast of 36 dancers.

''I did all the sketches for the costumes,'' she says. ''That was actually the part I did first. There were certain people who I knew were going to be part of the ballet, so I could start on them early on, before we had developed the story in detail.''

Will people be surprised at her level of involvement?

''Well I have been involved in this sort of thing before, several times,'' she says. ''Twenty years ago I did another production, which I thought at the time was all right. And I can see now that it wasn't. Since then I have accumulated a certain level of experience.''

So people within Denmark won't be surprised?

''They probably got a shock the first time, but now they're used to it.''

Dancers in the production have had to get used to being scrutinised by a reigning queen. As the lights dim for the rehearsal, the Queen is sitting alongside the artistic director, scribbling away in a heavily annotated A4 pad.

''It was odd at first, but she said right from the beginning that this is work,'' a London-based dancer, Joel Morris, says. ''She made us all feel really comfortable. And I thought she'd hardly be around at all, but she's here all the time - even at the non-costume rehearsals.''

One dancer, munching on a salad in the staff canteen, says the cast might be expected to bow for other royalty. ''But she doesn't want any of that,'' he says. ''You almost forget she's the queen,'' says Angela Maree, a South African who dances the role of the Sugar Plum Fairy.

The Sunday Telegraph, London