Prime Stephen Harper offered emotional praise at the funeral of a soldier shot dead by a gunman who then stormed Canada's seat of government last week.

Harper spoke Tuesday about the loss of Cpl. Nathan Cirillo, gunned down as he stood as a ceremonial guard at Ottawa's National War Memorial in what the prime minister has called a terrorist attack.

"May his son young Marcus Daniel Cirrilo someday find comfort in the fact that our entire country looks up to his dad with pride, with gratitude, with deep abiding respect," Harper said before pausing to collect his emotions.

"Cpl. Nathan Cirillo knew the most precious values are those that can cost us our lives so may God bless Cpl. Nathan," added the Conservative leader. "We are better for his life and we are diminished by his loss."

In a homily, Rev. Rob Fead called Cirillo "Canada's son" and said the tragedy of his death 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."

England's Queen Elizabeth, who remains Canada's ceremonial head of state, sent a message to Cirillo's regiment, expressing sorrow at his death under such "grievous" circumstances.

Near the Christ's Church Cathedral, people lined up four deep to watch a procession of soldiers carrying Cirillo's coffin. At one point a group of young women sang the national anthem, drawing applause from the crowd.

Hundreds of bouquets and wreaths were piled on the steps Lt.-Col. John Weir Foote armory, along with written tributes.

The father of a five-year-old son, Cirillo is to be buried in an area that honors military personnel at a Hamilton cemetery Tuesday.

Cirillo's killer, 32-year-old Michael Zehaf-Bibeau, was shot dead by the sergeant-at-arms after he ran into the Parliament building.