The Duke and the Duchess of Cambridge made a sombre appearance as they honoured the fallen in one of the bloodiest battles in British military history.
The royal couple, along with Prince Harry, visited the site of the Battle of the Somme, which was fought in the First World War.
The Duke paid tribute to the soldiers killed 100 years ago, saying "we lost the flower of a generation".
William spoke of European governments "including our own" who failed to "prevent the catastrophe of world war", in a speech during a military vigil at the gigantic Thiepval Memorial to the Missing in northern France.
The event was held ahead of Friday's 100th anniversary of the start of the battle, which lasted 141 days and claimed hundreds of thousands of British, French and German lives.
In an address written by Birdsong novelist Sebastian Faulks, William highlighted the almost 60,000 British and Commonwealth casualties of July 1 1916, the bloodiest day in the history of the British Army.
William told the assembled guests: "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.
"It was in many ways the saddest day in the long story of our nation.
"Tonight we think of them as they nerved themselves for what lay ahead. We acknowledge the failures of European governments, including our own, to prevent the catastrophe of world war."
William said the event honoured the more than 72,000 men whose names adorn the Thiepval monument, whose bodies have never been found, and those laying in Commonwealth cemeteries that litter the fields of the former Somme battlefield.
He added: "Tonight, we stand here with a promise to those men: We will remember you. The gift you have given your country is treasured by every one of us this day.
"The sacrifice you made will never, ever be forgotten."
Before the vigil's start William, Harry and Kate had climbed to the top of Sir Edwin Lutyens' 45m (148ft) monument to view the battlefield.
They were told of the carnage of 100 years ago which claimed the lives of more than a million men on all sides.
Harry also spoke at the event, reading the poem Before Action, written by Lieutenant WN Hodgson of the 9th Battalion the Devonshire Regiment, who wrote it days before he was killed in action on July 1 1916.
A benediction was also given by the Most Reverend Justin Welby, the Archbishop of Canterbury.