Canadians who died at Vimy Ridge helped shape Canada into a nation committed to peace, Prime Minister Justin Trudeau said Sunday at a ceremony marking the 100th anniversary of the First World War battle.

Trudeau was among the dignitaries to speak at the ceremony at the Canadian National Vimy Memorial in northern France, where as many as 25,000 people came to honour the Canadians who died in the fighting.

The battle marked the first time all four Canadian divisions fought together side-by-side during the war, advancing together on the heavily fortified ridge. Earlier British and French attacks on the stronghold had failed to budge the defenders.

Canada lost 3,600 soldiers and more than 7,000 were injured during the three-day battle.

At Sunday's ceremony, many people in the crowd used umbrellas to guard against the hot sun — different from 100 years ago when soldiers here faced rain and sleet in battle. The ceremony was marked by performances from different singers and actors who have taken on the roles of different historic figures who were at Vimy.

The area around the memorial was also lined with empty black combat boots, representing those who died.

Military boots symbolizing dead soldiers are seen at Canadian National Memorial in Vimy, France on Sunday. (Pascal Rossignol/Reuters)

"As I see the faces gathered here — veterans, soldiers, caregivers, so many young people — I can't help but feel a torch is being passed," Trudeau said in his speech. "One hundred years later, we must say this, together. And we must believe it: Never again."

The ceremony, hosted by the Canadian government, included recitations of stories from soldiers and eyewitnesses to the battle, and performances by Canadian singers such as Johnny Reid and Loreena McKennitt.

Prime minister speaks at ceremony marking the 100th anniversary of the First World War battle 7:22

Before the prime minister spoke, Gov. Gen. David Johnston told the crowd that the Vimy monument symbolizes the enduring friendship between Canada and France, underscored by the hundreds of thousands of Canadians who helped liberate the country.

"Those spires stand for peace and for freedom," Johnston said. "They stand for justice and hope. And they remind us that one cannot exist without the other."

The family of a Canadian soldier who fought in the battle for Vimy makes the same journey to northern France 100 years later 8:01

The site became a piece of Canadian territory on French soil in 1922 and is featured on the $20 bill.

Prince Charles — who was accompanied by his sons Prince William and Prince Harry — commended Canada for its sacrifice during the war.

"(The Canadians) succeeded in seizing the vital high ground of Vimy — a task in which many others before them had failed," Prince Charles said.

"However, victory came at an unbearably heavy cost. This was, and remains, the single bloodiest day in Canadian military history. Yet Canadians displayed a strength of character and commitment to one another that is still evident today. They did not waver. This was Canada at its best ... "

Prince Charles and Gov. Gen. David Johnston lay wreaths at the Canadian National Vimy Memorial during a commemoration ceremony to mark the 100th anniversary of the Battle of Vimy Ridge on Sunday. (Philippe Huguen/Reuters)

Earlier in the day, hundreds of citizens from the French city of Arras turned out in a heartfelt display of thanks to Canada and the thousands of Canadian soldiers who fought and died at nearby Vimy Ridge.

Arras Mayor Frederic Leturque thanked those other countries whose soldiers participated in the battle a century ago: Australians and British, New Zealanders and South Africans.

But he saved a special thanks for Canada, telling Trudeau and the hundreds of others assembled that the Canadians' actions at Vimy was a turning point for the city — and for all of France.

Watch a replay of CBC's full Vimy Ridge special, hosted by Peter Mansbridge, below: