KANDAHAR, Afghanistan - A Canadian officer on his first tour in Afghanistan was killed Tuesday in a prolonged firefight with Taliban militants who stubbornly cling to patches of arid farmland west of Kandahar.

Capt. Richard (Steve) Leary, 32, was leading a foot patrol involving Canadian and Afghan soldiers when they were ambushed with small-arms fire around 9 a.m. local time.

A sporadic, half-hour running battle ensued. Leary was hit as his soldiers were moving toward the cover of a safer position.

An air strike was called in and the insurgents were beaten back.

"Steve was what we in uniform are expected to be: he was a soldier and a leader," Col. Jamie Cade, the deputy commander of Canadian troops in Afghanistan, told reporters at Kandahar Airfield, where Leary was evacuated by helicopter.

Cade said medics and doctors struggled valiantly but were not able to save Leary, who was pronounced dead in hospital.

"Every death or injury is deeply painful to us, but it is a risk that we - as members of the armed forces - understand and assume as we work to bring peace and stability to a country torn apart by decades of war," he said in a prepared statement.

The Brantford, Ont. native was married but had no children.

No other soldiers were hurt in the engagement.

The army would not say precisely where in the Panjwaii district the extended battle took place, citing operational security and the need to keep militants guessing about the damage they have inflicted.

Leary, a platoon commander, served with 2nd Battalion, Princess Patricia's Canadian Light Infantry based in Shilo, Man.

His loss is being felt keenly by his men, said Maj. Jay Janzen, a senior army spokesman in Kandahar.

"When you lose a leader as effective as Capt. Leary, as personable, it is difficult, but we're just thinking about (his) family right now," said Janzen.

Leary was the second soldier in a month to die in an ambush.

The last was Cpl. Michael Starker, a reservist and Calgary paramedic whose goodwill patrol was attacked within sight of a major Canadian forward operating base. The May 6 attack happened in the restive Zhari district, which like Panjwaii has been a hotbed of militant activity and bomb-makers.

There have been 84 Canadians soldiers and one diplomat killed since the start of the Afghan war.

The latest combat death came a day after four Canadian soldiers and an Afghan interpreter were wounded in two separate attacks, also in the Zhari district. Two of the soldier badly injured in Monday's attacks have been evacuated to U.S. military hospital in Germany for further treatment.

The army does not identify wounded soldiers.

Canadian troops, as part of an evolving strategy in the counter-insurgency war, have been conducting more foot patrols, leaving behind the protection of their armoured vehicles in order to be more reassuring to wary Afghans, whom they're trying to win over.

"It's dangerous business, there's no question about that, but if we're not out there doing our jobs we'll never be successful," said Janzen.

"The reason we're doing that is we want to set the conditions for security to increase so that reconstruction and development can take place in Kandahar province."

Last week, the Princess Patricia's battle group swept through eastern Zhari district looking to dismantle bomb-making networks. The four-day operation ended with no Canadian casualties but did result in the death of a Taliban group commander along with 16 other militants.

Tributes for Leary poured in from Prime Minister Stephen Harper, Defence Minister Peter MacKay, Liberal Leader Stephane Dion and NDP Leader Jack Layton.

"Each and every woman and man who volunteers to help rebuild Afghanistan is a source of inspiration and hope for the Afghan people," Gov.-Gen. Michaelle Jean said in a statement.

"I commend Capt. Leary for his hard work and the sacrifices he willingly made with courage and conviction. On behalf of our entire country, we offer our sincerest condolences to his family, friends and comrades-in-arms. Our hearts and our thoughts are with them."

Also, in the eastern part of Afghanistan on Tuesday, two other NATO soldiers were killed, a third soldier and one Afghan civilian were wounded during a patrol.

The military alliance did not say which country the soldiers belonged to, but U.S. and Polish forces operate primarily in the east.