Media playback is unsupported on your device Media caption Marking the moment the Battle of the Somme began

Thousands of people, including members of the Royal Family, have attended a ceremony in France to mark the centenary of the Battle of the Somme.

The Prince of Wales and Duchess of Cornwall, the Duke and Duchess of Cambridge and Prince Harry were at the Thiepval Memorial for the event.

Earlier, a UK-wide two-minute silence at 07:28 BST marked the start of the World War One battle on 1 July 1916.

More than a million men were killed or wounded on all sides at the Somme.

The Battle of the Somme, one of WW1's bloodiest, was fought in northern France and lasted five months, with the British suffering almost 60,000 casualties on the first day alone.

The British and French armies fought the Germans in a brutal battle of attrition on a 15-mile front.

At the Thiepval Memorial ceremony, close to the battlefields of the Somme, Prince Charles gave a reading from The Old Front Line by John Masefield who visited the Somme in 1917 and recounted a landscape devastated by war.

This was followed by the hymn Abide With Me.

The Archbishop of Canterbury, The Most Reverend Justin Welby, said in a prayer: "On this day we remember all those caught up by the Battle on the Somme; those who faced the terrible waste and devastation, those who fought against all the odds, who endured the clinging mud and squalor of the trenches."

Prime Minister David Cameron read the words of Corporal Jim Crow, 110th Brigade, Royal Field Artillery, which highlighted a moment of humanity and mutual respect amid the hell that that part of France had become.

The actor Charles Dance read "Aftermath", a poem by Siegfried Sassoon, which asks "Have you forgotten yet?"

At a vigil in France on Thursday evening, the Duke of Cambridge paid tribute to the fallen soldiers, saying "we lost the flower of a generation".

At the Theipval Memorial ceremony

Image copyright AFP/Getty Images

By Sophie Long, BBC News correspondent

Everything is different here now, compared to this day 100 years ago. That morning thousands of British, Commonwealth, French and German soldiers woke to bright sunshine and birdsong, and looked out on fields mangled by trenches and bombardment as they contemplated what was ahead.

Today rain poured down on 10,000 people sitting on chairs set out in parallel lines, surrounded by perfectly manicured lawns, as they remembered the nearly 20,000 Britons who died here on this day a century ago, and contemplated what had passed.

They looked up at the Theipval Memorial to the missing. Those who gave readings stood between its imposing walls and the names of 72,000 men who fought here, but were never found.

Royalty, heads of state and actors recalled what happened here through the words of those that lived it. So too did serving personnel - some, young men, just like many of the 57,000 who were killed or injured during what remains the worst day in British military history.

At an early-morning ceremony at the Lochnagar crater, which was created by an explosion at the start of the battle in La Boiselle, a rocket was fired to simulate the artillery fire.

This was followed by whistles to symbolise those that were blown a century ago as men scrambled from the trenches.

Ahead of the two-minute silence in the UK, the King's Troop Royal Horse Artillery fired guns from Parliament Square for 100 seconds to mark the 100 years since the battle began.

Across the country and at the vigil sites at Westminster Abbey, Edinburgh Castle, the Somme Heritage Centre in County Down, the Welsh National War Memorial in Cardiff, as well as in France, the silence was observed.

Image copyright PA Image caption Prince Harry and the Duke and Duchess of Cambridge listened to readings and prayers at the ceremony

The Prince of Wales and Duchess of Cornwall joined leaders from Northern Ireland and the Republic of Ireland at a service at the Ulster Tower, a memorial to the men of the 36th (Ulster) Division in Thiepval.

The royal couple then attended another ceremony at the preserved trenches at Newfoundland Park Memorial in Beaumont-Hamel to mark the role of soldiers serving with the Royal Newfoundland Regiment.

The Royal Canadian Artillery brass band played the Last Post during the ceremony under a monument of a caribou, the regiment's emblem.

The Duchess of Cornwall was due to lay a wreath at the grave of her great-uncle, Captain Harry Cubitt, who was killed on the Somme in September 1916 while serving with the Coldstream Guards.

He was the eldest, and the first, of three brothers to die serving on the Western Front.

The 100th anniversary will be marked by Germany in Fricourt, France, where 40,000 Germans are buried.

And in Manchester, a wreath laying ceremony was held at the Cenotaph in St Peter's Square ahead of a national service of commemoration at the cathedral.

Image copyright PA Image caption A gun was fired to mark the end of the vigil at Westminster Abbey

Meanwhile, men dressed as World War One soldiers were been spotted in railway stations and on UK streets handing out cards detailing casualties of the Battle of the Somme.

The hashtag #wearehere, which features on the cards, was trending on Twitter as pictures of the tribute were shared before it was revealed that National Theatre head Rufus Norris and artist Jeremy Deller were behind the project.

Entitled We're Here Because We're Here, it was commissioned by 14-18 NOW, the UK's arts programme for the World War One centenary.

Image copyright Mar Dixon Image caption Men dressed as World War One soldiers have been spotted at railway stations

At the Westminster Abbey service on Thursday, the Queen was joined by the Duke of Edinburgh as she laid flowers at the Grave of the Unknown Warrior.

The tomb holds an unidentified British soldier killed on a European battlefield, brought back and buried in the abbey to honour the unknown dead of the war.

The Bishop of London, the Right Reverend Dr Richard Chartres, said the legacy should be that people worked towards reconciliation to ensure children never endured what the soldiers of WW1 faced.

Society must strive to reach an accord and reject "those who would stir up hatred and division," he said.

The Duke and Duchess of Cambridge and Prince Harry attended a vigil at the Thiepval Memorial on Thursday evening.

Prince William spoke of European governments "including our own" who failed to "prevent the catastrophe of world war".

"We lost the flower of a generation; and in the years to come it sometimes seemed that with them a sense of vital optimism had disappeared forever from British life," he said.

"It was in many ways the saddest day in the long story of our nation."

Image copyright AFP/Getty Images Image caption A ceremony at the Lochnagar Crater in La Boiselle, France, was the first event of the day

Image copyright Getty Images Image caption The Queen laid a wreath at the Grave of the Unknown Warrior

Prince Harry also spoke at the event, reading the poem Before Action, by Lieutenant WN Hodgson of the 9th Battalion the Devonshire Regiment, who wrote it before he was killed in action on the first day of the battle.

Before the vigil, the three royals climbed to the top of the huge, newly renovated monument designed by Sir Edwin Lutyens to view the battlefield.

Image caption A wreath was laid at the Grave of the Unknown Soldier, where a vigil was held

The memorial bears the names of more than 70,000 British and South African soldiers who have no known grave.

Welsh First Minister Carwyn Jones joined personnel from the Army, Royal Navy and the Royal Air Force for the start of a vigil at Llandaff Cathedral in Cardiff.

"Those who fought bravely for our futures should never be forgotten," he said.

In Scotland, an overnight vigil was held at the National War Memorial.

And in Northern Ireland, a vigil was held at the Somme Museum near Newtownards, County Down. A guard of honour, including serving soldiers, was present throughout the night.

Image copyright Getty Images

The Battle of the Somme

Began on 1 July 1916 and was fought along a 15-mile front near the River Somme in northern France

19,240 British soldiers died on the first day - the bloodiest day in the history of the British army

The British captured just three square miles of territory on the first day

At the end of hostilities, five months later, the British had advanced just seven miles and failed to break the German defence

In total, there were more than a million dead and wounded on all sides, including 420,000 British, about 200,000 from France and an estimated 465,000 from Germany

Find out more:

The Battle of the Somme was intended to achieve a decisive victory for the British and French against Germany's forces.

The British army was forced to play a larger than intended role after the German attack on the French at Verdun in February 1916.

World War One finally ended in November 1918.