Cpl. Nathan Cirillo's coffin, carried atop a gun carriage to Christ's Church Cathedral, was accompanied by members of his regiment as well as scores of soldiers and police officers marching to the sounds of muffled drums.
In a homily, Rev. Canon Rob Fead called Cirillo "Canada's son" and said the tragedy of his death had helped bring the country together.
"We gather this day in faith and in hope," Fead told mourners. "His bravery, his sacrifice, is not in vain."
In a message to Cirillo's regiment, the Queen expressed sorrow at his death under such "grievous" circumstances.
"I send my deepest sympathy to all those affected by this tragedy, in particular to members of Cpl. Cirillo's own family," the Queen, who is the regiment's colonel-in-chief, said in her note.
Near the church, people lined up four deep to watch the procession, many of them holding Canadian flags and balloons emblazoned with the Maple Leaf. At one point on the route, a group of young women sang the national anthem, drawing cheers and applause from the crowd.
However, as the casket went by, silence befell the street save for the mournful strains of bagpipes or drumming.
Hundreds of bouquets and wreaths were piled on the steps Lt.-Col. John Weir Foote armoury, along with written tributes to Cirillo.
"Reservist Cpl. Nathan Cirillo — we will never forget your sacrifice," one read.
Others left toys and treats for Cirillo's dog.
An unarmed Cirillo was standing ceremonial guard at the National War Memorial in Ottawa last Wednesday when a gunman shot him in the back before rushing into the Centre Block on Parliament Hill, where security staff felled him in a hail of bullets.
Prime Minister Stephen Harper and his wife Laureen were among family, friends and a host of dignitaries bidding farewell to Cirillo, 24, at the full regimental funeral.
In his tribute, Harper talked about the "gut-wrenching" irony that Cirillo was killed guarding the Tomb of the Unknown Soldier.
"He knew what he was protecting and he knew what he was preserving," Harper said. "He died protecting and preserving."
Cirillo's cousin, Jenny Holland, said he was a rambunctious, smiling adventurous child — qualities he kept even as he grew into manhood.
"Nathan may have looked like a big tough man, but he was such a kid at heart," Holland said.
Because only invited guests were allowed into the funeral service, proceedings were broadcast on screens at a sporting arena in the city.
Throngs of people nonetheless stood watch from across the street during the service. Someone shouted "We love you!" as mourners filed out the church, prompting others to yell their support.
There was a burst of applause from the crowd and dignitaries — including the prime minister — as the motorcade pulled away.
Ron Weinberger, whose son Ryan was a close friend of Cirillo's, said he believed something positive had come out of the tragedy of Cirillo's death.
"It really seemed to unite the country," Weinberger said as he walked to the church.
"That unity, that strength — that's what Nathan has done."
Cirillo, the father of a five-year-old son Marcus, is to be buried in a field of honour at a Hamilton cemetery.
Harper said he hoped Marcus would one day take solace in the fact that the entire country "looks up to his dad."
Lt.-Col. Lawrence Hatfield, commanding officer of the Argyll and Sutherland Highlanders regiment, praised Cirillo as a soldier of character whose warm and radiant smile exuded "unmistakable confidence."
While bullets took his physical life, Hatfield said, his attributes have illuminated Canada.
Cirillo's death came two days after another soldier, Warrant Officer Patrice Vincent, was run down and killed in an attack south of Montreal.
A fundraising effort for their families has raised $550,000.
On Monday, a steady stream of mourners filed into a funeral home to pay their respects at his open coffin.
Cirillo lay in his formal uniform, his white-gloved hands crossed on his chest, as two members of his regiment stood guard on either side of the coffin.
The sight drew tears from many mourners, a number of whom didn't know him personally but felt compelled to pay tribute to him.
Wreaths, bouquets and signs of support have been laid outside Cirillo's family home and outside the funeral home where his visitations were held.
Thousands of people also expressed their grief and paid tribute along the Highway of Heroes as Cirillo's body was brought home to Hamilton from Ottawa on Friday.
Also on HuffPost