The Prince of Wales became the Prince of Denmark as he joined acting royalty on stage to mark the 400th anniversary of Shakespeare's death.
Charles made a surprise appearance as Hamlet in a star-studded televised gala performance in the Bard's birthplace in Stratford-upon-Avon.
The town's riverside Royal Shakespeare Theatre hosted performances from famous names including Dame Judi Dench, Sir Ian McKellen, Benedict Cumberbatch and David Tennant as acting greats paid tribute to the playwright's continuing legacy.
Charles, who had been watching the Shakespeare Live! From The Royal Shakespeare Company show with the Duchess of Cornwall, was heard to speak from the wings, asking: "Might I have a word ... "
Then followed the opening lines to what is one of Shakespeare's best-known soliloquys: "To be or not to be, that is the question."
The show, which featured Shakespeare-inspired work spanning a range of musical genres, was screened live to 368 cinemas in the UK and Europe.
Backstage after the performance, Charles spoke to stars including Helen Mirren, Dame Judi and David Suchet.
Asked what they made of Prince's stage debut, Helen Mirren joked: "Never act with children, animals ...", before she and Dame Judi chorused: "Or Prince Charles!"
Meanwhile, comedian Al Murray, who had earlier played the donkey-eared Bottom opposite Dame Judi in a rendition of a scene from A Midsummer Night's Dream said: "I had a ball".
He revealed the large prosthetic ears "took an hour to put on" in hair and make-up, leaving him "confined to barracks" all day with appendages attached, after they fell off during a previous rehearsal.
"I had a serious conversation with Rufus Wainwright earlier about the EU and then realised I had jackass's ears on," he added.
Asked what he made of Charles' performance, he said: "That was fantastic.
"What was really brilliant about that sketch is the ante kept getting upped.
"We reached the point where you say how the hell do you top this?
He added: "I didn't realise they were rehearsing it for the Prince, that was really brilliant - a real coup de theatre."
Gregory Doran, artistic director, revealed Charles "jumped" at the chance to play a part in the show, which was two years in the making, when asked about a possible role last Christmas.
He added: "I knew he'd be game and up for it but wanted to make sure it was appropriate and fun.
"I took up my courage and said 'how about being in it' and he jumped at it."
The surprise royal appearance marked the end of a day celebrating the town's most famous son.
Earlier Charles visited the last resting place of the Bard at Holy Trinity Church, laying a wreath at his grave, after touring the site of a new garden located on what was the location of the world-renowned playwright's former home.
The Prince, paying his respects with a moment's silence and prayer inside the church, was shown an inscription of Shakespeare's grave stone which reads "cursed be he who moves my bones".
The Rev Patrick Taylor explained how it was believed the writer had his grave inscribed with the curse because he was "petrified" his remains might be moved to a nearby charnel house, which lies behind a church door just a yard or two from the grave.
Charles replied: "It certainly reminds you of your mortality".
As he looked around the church which has been a place of worship for 1,200 years, the Prince remarked: "It is such a special place."
He was given a guidebook to keep by Year 5 pupils from Stratford-upon-Avon Primary School and met an elderly couple who had married in the church 60 years before.
Charles had a little earlier toured the New Place on the former site of Shakespeare's town house, now long since demolished, where a garden is being established to remember the poet's legacy and works.
For the Bard's supporters, the day had started with a theatrical parade through the town to pay homage to the writer, who was born and died on April 23.
Bishop of Coventry Christopher Cocksworth, speaking following Charles visit to the church, said: "It is a great and proud day for Stratford.
"He was a local boy who is a child of the town and now he's a child of the world."
In the morning the town witnessed a theatrical parade, made up in equal parts of contemplative moments, symbolism and riotous celebration, courtesy of a New Orleans jazz band.
The street celebrations featured civic dignitaries, local schoolchildren, musicians and performers, and a centrepiece ceremony with the unfurling of a birthday flag bearing the writer's image.
The crowds were asked to play their parts by tossing sprigs of rosemary "for remembrance", as the Bard wrote in Hamlet, as a funeral bier of flowers was pulled through the town's streets.
Visitors then donned thousands of Shakespeare face-masks which had been handed out.
The mood struck a more celebratory note with the appearance of the 12-piece Wendell Brunious Band from Louisiana who shuffled and shimmied along the parade route with a New-Orleans flavoured jazz procession.
Band leader Andrew LeDuff, said the group, including members of New Orleans' Tulane University, had jumped at the chance to mark Shakespeare's global impact and "celebrate his life".
Playing a key role in this year's landmark anniversary is the Royal Shakespeare Company, whose grand Stratford theatre on the banks of the River Avon continues to stage the Bard's plays in sell-out performances, in a testament to his on-going popularity.
The celebrations also featured a fireworks display and a line of light, leading to Holy Trinity, as well as a graveside vigil.
Earlier, US president Barack Obama was treated to a special performance of scenes from Hamlet at Shakespeare's Globe Theatre in London, praising the actors as "wonderful".
Shakespeare, who penned almost 40 plays, over 150 sonnets, and coined well-known phrases still widely used to this day, died in 1616 aged 52.