A Canadian soldier was killed by an improvised explosive device Thursday, just a few days short of the end of his tour of duty in southern Afghanistan.

Pte. Kevin McKay, of the 1st Battalion of the Princess Patricia's Canadian Light Infantry, died when an explosion erupted around his platoon while on patrol in a village just outside Kandahar City.

The 24-year-old from Richmond Hill, Ont., was on a "presence patrol" in the village of Nakhonay, about 15 kilometres west of Kandahar City, when the IED exploded.

The foot patrols are intended to demonstrate to local Afghans that NATO troops have pushed the Taliban out of the area, part of the volatile Panjwaii district that was the scene of fierce fighting in 2006 and 2007.

Col. Simon Hetherington, the deputy commander of Task Force Kandahar, said McKay embodied the spirit of the Canadian soldier.

"He was the type of soldier that Canadians might think of when they think of their army in Afghanistan -- the tough, courageous infantryman, living in austere conditions and doing incredibly difficult work," Hetherington said from the main coalition base at Kandahar Air Field.

"His platoon brothers and friends will remember Kevin, better known as 'Mickey' to his buddies, as a generous man, dependable, with a quick wit and a great sense of humour that was exemplified by his awesome moustache."

Hetherington, speaking on behalf of task force commander Brig.-Gen. Dan Menard, who is on leave, said that McKay was short in stature but not in the estimation of his comarades.

"While not a tall man, he had no difficulty in poking fun and taunting those less vertically challenged platoon mates," Hetherington said.

Prime Minister Stephen Harper said in a statement that McKay served Canada valiantly, and deserves the gratitude and respect of his nation.

"Canadians are forever proud and grateful for his service and for the contributions of all our men and women in uniform to this UN-mandated, NATO-led mission."

McKay is the 144th Canadian soldier to die in Afghanistan since the mission began in 2002. Two civilians -- diplomat Glyn Berry and journalist Michelle Lang -- have also died.

McKay's death comes as hundreds gather in Halifax to remember the first Canadian sailor to be killed in the Afghan conflict.

A memorial service will be held for 37-year-old Petty Officer 2nd Class Craig Blake, who was killed by an IED on May 3, also in the Panjwaii district.

About 1,000 people are attending the service at 12 Wing Shearwater, a huge aircraft hangar overlooking Halifax harbour.

Blake had 10 years' experience as a clearance diver for the Canadian Forces and was a member of Maritime Forces Atlantic Fleet Diving Unit.

Members of the diving unit carried Blake's remains into the memorial service.

His remains will be placed in the sea at a private ceremony.