OTTAWA  Canada’s top military officer said Sunday that on more than one occasion, Canada did not turn over Afghan prisoners to the Afghan government, fearing for their safety. The acknowledgment by the officer, Gen. Walter Natynczyk, the chief of the defense staff, appeared inconsistent with Canada’s assertions that such prisoners had not been tortured.

The brief remarks by General Natynczyk at a news conference in Halifax, Nova Scotia, came amid a vigorous campaign by the Conservative government to discredit the testimony of a senior Canadian diplomat, Richard Colvin, who told a parliamentary committee last week that “the likelihood is that all the Afghans we handed over were tortured” during his time as second in command at the embassy in Kabul in 2006 and 2007.

Mr. Colvin detailed his efforts to warn the Canadian government and military about instances in which, he said, prisoners had been sexually abused, beaten, stabbed, shocked, and burned. He said that those warnings were ignored and that he had been ordered not to document the allegations. Canada’s practices regarding Afghan prisoners, Mr. Colvin said, were “un-Canadian, counterproductive and probably illegal.”

The government, which earlier used national security laws to block Mr. Colvin from cooperating with a military police commission’s inquiry into the prisoners’ fate, responded by attacking Mr. Colvin’s credibility. The defense minister, Peter MacKay, dismissed the testimony from Mr. Colvin, now assigned to the Canadian Embassy in Washington, as “hearsay, second- or third-hand information, or that which came directly from the Taliban.”