Mourners in Lac-Megantic, where an estimated 47 people were killed in the derailment, packed a church and occupied the main drag for a memorial and Roman Catholic mass.
"Our town, its heart devastated, is mourning its children," parish priest Steve Lemay said in his homily.
"Children who were unique because of a colour and vitality they brought to their families.''
Prime Minister Stephen Harper was among numerous politicians in town for the ceremony, held three weeks after a runaway tanker train slammed into Lac-Megantic's downtown core and set off a series of explosions. The tankers were filled with millions of litres of crude oil.
Harper gave Lac-Megantic Mayor Colette Roy-Laroche the Canadian flag that flew at half-mast on Parliament Hill's Peace Tower in honour of those who died in the July 6 disaster.
In his address, Lemay tried to describe the anguish in Lac-Megantic.
''Brothers and sisters, what happened here? What happened here in Lac-Megantic? Unbelievable events that caused us inexpressible suffering," he told mourners inside the 1,000-seat Ste-Agnes Church, which sits just over 100 metres from the epicentre of the disaster.
Lemay continued with a more hopeful message to the living.
He said he found that inspiration in the courage of crews at the disaster site; the volunteers in the parish; the schools transformed into shelters; and the legions of dedicated public workers.
"The procession of death meets that of life," he said in a homily broadcast live on big screens set up for swarms of people on Laval Street, where the packed-in crowd stretched for a couple of hundred metres.
"We can all help life triumph. On our own path, we each experience these little victories over evil — little victories over suffering."
The church reserved 700 seats inside the building for families of those killed in the disaster, with the remaining pew spots set aside for locals, volunteers and dignitaries. The ceremony was presided over by Luc Cyr, the archbishop of Sherbrooke.
Outside, some mourners clutched flickering candles and watched the big screens from lawn chairs they had planted in the middle of the road.
During the ceremony, the lineup for communion on the street was so long that one of the clergymen who handed out wafers had to return to the church to refill his bowl. He came back to his spot a couple of minutes later with two other members of the clergy, who were also carrying bowls to help him meet the demand.
One of those who watched from the road was Sophie L'Heureux, the manager of Musi-Cafe bar. She lost many friends and co-workers after fireballs consumed the popular watering hole moments after the crash.
"It's an important step in the mourning process," she said of the service's impact on the town of 6,000.
"The whole population of Lac-Megantic is still really in a state of shock, even after three weeks. It will stay engraved on our hearts and on our memories for a long time."
Lac-Megantic resident Monique Cliche described the healing properties of such a ceremony as "the beginning of a new state in our hearts," but she added that difficult times remain before reconstruction can really begin.
"There's going to be a lot of funerals," said Cliche.
"I think that every day next week there's a funeral scheduled and it's going to be like this for maybe the next two, three weeks."
Elected officials and dignitaries received cheers from the outdoor crowd as they entered Ste-Agnes Church before the ceremony.
The loudest applause by far, however, was reserved for a group of uniformed firefighters who walked through the church doors moments later.
Along with the prime minister and Lac-Megantic's mayor, the service was also attended by Gov. Gen. David Johnston, Premier Pauline Marois, NDP Leader Tom Mulcair and Maine Gov. Paul LePage.
''Obviously, this has been a very emotional day followed by a very emotional period, with lots of emotions yet to come," Harper said after the mass.
''It is still very difficult to fully absorb this when you see all of these families who have been so terribly affected.
''I am here with Laureen just so we can share our thoughts and prayers with all of the victims, with their families and with their friends.
''And also, as prime minister, to express the solidarity of all Canadians with the people here, something I know the people of Lac-Megantic greatly appreciate.''
Marois' voice was strained and she appeared to be holding back tears later, as she said Quebecers were fully behind the people of Lac-Megantic.
"Quebec, with all its heart, is with you," Marois said.
The tragedy has triggered several lawsuits, a police investigation and a probe by federal transportation-safety officials.
Quebec and the federal government have each promised $60 million for emergency assistance and longer-term reconstruction help for the town.
Ottawa has also revamped some rules on train transport, following the advice of the federal Transportation Safety Board.
Before the ceremony, Mulcair indicated that a lot of questions remain about improving railway safety, but he said Saturday was about showing solidarity with the people of Lac-Megantic.
"It's important for them to know that people across Canada support them and are with them," he said.
One of the people standing in the outdoor crowd, Liberal Leader Justin Trudeau, was conducting a TV interview but he stopped to join others in applauding the arrival of the dignitaries, including his political rivals.
While other politicians entered to sit in the pews, Trudeau watched the mass from outside on the giant screens set up for those who couldn't get in. He said he was told there was no more room in the church for dignitaries.
From the outdoor crowd's vantage point, the nearby signs of the derailment were easy to spot over the security fence, including piles of debris from fallen buildings and a tanker car on the railroad tracks.
Search crews are still trying to find five missing bodies in the blast area.
One firefighter who helped with the post-disaster cleanup brought his sons to Saturday's memorial.
"It's devastating to see what's happened down there across the fence... I'll never live this again, I'm sure. I hope I never do," said Michel Campagna, who works in the nearby municipality of Cookshire-Eaton.
"When you walk down and you see that there is totally nothing left... it's a wonder they could even find anybody. Thank God they have."
- With files from Nelson Wyatt
Also on HuffPost