Media playback is unsupported on your device Media caption Watch highlights from the celebrations

Dame Judi Dench and David Tennant have joined other stars at a gala marking 400 years since Shakespeare's death.

Saturday's Shakespeare Live show in the playwright's birthplace of Stratford-upon-Avon included play scene performances, dance and music.

The show also saw royal guest Prince Charles make a surprise appearance in a sketch from Hamlet.

The gala ended a day of national events which included President Obama visiting Shakespeare's Globe theatre in London.

Screened live on BBC Two, the gala at Stratford's Royal Shakespeare Theatre also saw performances from Benedict Cumberbatch, Sir Ian McKellen and Meera Syal.

Al Murray, the pub landlord, played Bottom to Dame Judi's Titania and Syal and Sanjeev Bhaskar played out the My Lady Disdain scene from Much Ado About Nothing.

Media playback is unsupported on your device Media caption Prince Charles puts his acting skills on display

But it was Prince Charles, attending with his wife the Duchess of Cornwall, who stole the show when he appeared unexpectedly on stage to join Dame Judi and others in a sketch based on Hamlet's To Be or Not to Be soliloquy, taking centre stage to speak the immortal lines himself.

The show was screened live to 368 cinemas in the UK and Europe.

Backstage after the performance, the prince spoke to stars including Dame Helen Mirren, Dame Judi and David Suchet.

Asked what they made of the prince's stage debut, Dame Helen joked: "Never act with children, animals," before she and Dame Judi said together: "Or Prince Charles!"

Comedian Murray said of his scene with Dame Judi: "I had a ball."

Image copyright Getty Images Image caption Sir Ian McKellen was among the host of stars at the gala

Critics have given the show good reviews with the Guardian saying: "Despite many intrinsic challenges, Shakespeare Live was an apt and vivid reminder of the playwright's chameleon brilliance."

The Metro said the Hamlet soliloquy joined by Prince Charles was a "brilliant six-minute long sketch".

And the Radio Times said Shakespeare fans had called the evening "an absolute treat".

Image copyright Getty Images Image caption Comedian Al Murray said he'd 'had a ball' as Bottom

Earlier in the day the prince was shown around Shakespeare's family home, viewed the gardens and visited an exhibition.

During his visit, the prince also went to Holy Trinity Church, and laid a wreath on Shakespeare's grave.

On Saturday morning, US President Barack Obama visited a London theatre dedicated to the work of the playwright.

The Globe theatre is a replica of the circular, open-air playhouse that Shakespeare designed in 1599.

Image copyright Reuters Image caption Mr Obama spent several minutes admiring the structure of the Globe theatre

Mr Obama watched a brief performance of a portion of Hamlet, again including the To Be or Not to Be soliloquy.

The scenes were performed by actors from a company of 16, who embarked on a two-year world tour in 2014 playing to more than 100,000 people in 197 countries.

Image copyright Reuters Image caption Actors performed a scene from Hamlet for Mr Obama

Image copyright Reuters Image caption Mr Obama described the performance as 'wonderful'

Dominic Dromgoole, artistic director of Shakespeare's Globe, said: "At the end of an extraordinary journey all around the world, it is great to return home to the Globe, and to be able to perform a few scenes and to be welcomed back by President Barack Obama.

"The spirit of 'Yes we can' has informed the entire tour, and it's an honour to meet the man who coined the phrase, and who exemplifies its spirit."

The US President made the trip before a visit to London's Royal Horticultural Halls where he urged young people to "reject pessimism and cynicism" and "know that progress is possible and problems can be solved".

Throughout the day on Saturday, Shakespeare's Globe screened short films of every one of Shakespeare's 37 plays on giant screens along the banks of the Thames, between Tower Bridge and Westminster.

The films featured actors delivering their lines in the locations where the plays are set - such as Cleopatra in Egypt, Julius Caesar in the Roman Forum and Hamlet at Elsinore.

Among the star names involved in the project, entitled The Complete Walk, are Gemma Arterton, Dominic West, Ruth Wilson, James Norton, Zawe Ashton and Peter Capaldi.

Discover more about Shakespeare

BBC Radio 3 is also broadcasting a weekend of Shakespeare-inspired music and performance live from the Bard's hometown.

Elsewhere, leading arts organisations across the UK made performances, analysis and talks available.

Image copyright Reuters Image caption People paraded the streets of Stratford-upon-Avon in costume

Shakespeare: England's greatest storyteller

Image copyright Reuters