CFB GAGETOWN, N.B. - A young Canadian medic killed earlier this month in Afghanistan was buried in his hometown of Fredericton on Wednesday as family, friends and colleagues remembered Pte. Colin Wilmot as a man of unflagging optimism.

"He was a man of hope,'' Padre Darryl Levy told the more than 300 people who filled a Protestant chapel at Canadian Forces Base Gagetown in New Brunswick.

Wilmot, 24, was killed by a roadside bomb on July 5 while on a nighttime foot patrol in the volatile Panjwaii district in southern Afghanistan.

The sombre mood among the mourners inside the chapel stood in contrast to the cloudless sky and blazing sunshine outside.

In front of the church, a dozen soldiers in dark-green dress uniforms stood at attention as Wilmot's flag-draped coffin was carried into the church, a lone bagpiper playing a mournful dirge.

The pallbearers -- five men and three women -- and colour guard were all members of Wilmot's Edmonton-based unit, 1st Field Ambulance, part of 2nd Battalion, Princess Patricia's Canadian Light Infantry Battle Group.

During the service, Levy said Wilmot had told his sister that he saw hope in the eyes of young, Afghan children who were able to play outside as a result of work done by Canadian troops.

"A child that comes up to you and wraps their arms around you, or smiles at you with a smile that just comes from the very bottom of their heart, will melt your heart right on the spot,'' Levy said. "That is what hope means for our troops.''

Levy said there was hope for Wilmot's family, too.

"You have hope knowing that Colin's legacy will live on, because all those who have gathered here have come ... to acknowledge his dedication and his commitment. Hope for each of you will rest in the stories and the memories that you each cherish.''

During the service, Maj. John Crook, the acting commander of 1st Field Ambulance, told the congregation that Wilmot was a dedicated soldier.

"Colin served his unit with honour and dignity,'' he said. "He was a shining example of what Canada has to offer.''

Wilmot's sister, Kathy Kingston, recalled how her brother was a smart, mischievous child who was known to cram things into the family's VCR.

She said he enjoyed the company of others and described him as "a thinker'' with a warm, caring personality.

"Colin cared about everyone, usually more than himself,'' she said. "What we'll miss most about Colin is his smile and his laugh.''

Cpl. Alicia Garbe, who had escorted Wilmot's coffin from Afghanistan, read a poem entitled, "A Canadian Soldier Goes Home Today.''

The final verse reads: "Yes, a Canadian soldier goes home today / Draped in our National Flag / His duty for his country is done / Rest well my fallen comrade.''

While Wilmot was not stationed at Gagetown, his family has a long military history in the province. His stepfather, Warrant Officer Eric Craig, transferred from the New Brunswick base to CFB Petawawa in eastern Ontario last year.

Colleagues and family members have said Wilmot had a perpetually sunny demeanour and was an outstanding medic who won the top award at the Armed Force's medic course.

Senior officers confirmed that Wilmot had demanded to be sent to Afghanistan even though he was not supposed to be part of the latest rotation.

He was scheduled to return home in September.

Before the service, Crook made it clear Wilmot had the right attitude for such a demanding job.

"He was a very personable, happy young man who always looked on the positive side of things,'' he said.

"His father told me that when he got to Afghanistan he said, `This is an incredibly beautiful country.' He was an extremely positive young man.''

In New Maryland, N.B., on the outskirts of Fredericton, the manager of the Esso Community Store described Wilmot as a fine young man.

"He was so polite, so pleasant,'' Pam Gilbert said in an interview.

Wilmot worked at the store for about a year in 2004-05. A sign in front of the store reads, "We will remember."