Canada delivered a harsh diplomatic rebuke to Libyan officials in both countries Friday after "credible" reports of torture linked to the country's interim government.

The Foreign Affairs Department delivered the demarche, or diplomatic note, after reports of torture and executions of captured loyalists of dead dictator Moammar Gadhafi surfaced.

Two international organizations -- Doctors Without Borders and Amnesty International -- said Thursday detainees have been tortured and killed in recent weeks and months, coupled with widespread abuse of former Gadhafi supporters.

Doctors Without Borders said it's pulling out of the city of Misrata because detainees were only being brought for care so they would be suitable for further interrogation.

Ottawa is "deeply concerned" by the reports and maintains that torture is "totally unacceptable," Parliamentary Secretary of National Defence Chris Alexander told CTV's Power Play.

"We are making our views known through diplomatic channels... but we continue to work with the Libyan people and the legitimate authorities to rebuild the country," he said.

Building a better Libya was the whole point of Canada's involvement in last year's rebellion, he added.

Alexander speculated that the torture, though still unacceptable, could be a case of some Libyans settling old scores with former authorities -- as occurred in the Balkans after its regime change and in Afghanistan after the Taliban.

"A lot of people were abused by the Gadhafi regime," he said. "Some may be having an eye for an eye."

But the country will need further guidance through the choppy, post-revolution waters if it is to form the sort of government and justice system for which the rebels fought, added Dr. Bezma Moe-mani of the Waterloo-based think tank the Centre for International Governance and Innovation.

"I don't think we should write off this new government. We do have to keep in mind that this is a transitional government. There's a lot to be learned and they're learning quite fast," she said.

Baird and Prime Minister Stephen Harper are attending the World Economic Forum in Davos, Switzerland this week.

The United Nations' top human rights official told Libya's transitional government to take control of its prisons and stop atrocities against inmates.

"There's torture, extrajudicial executions, rape of both men and women," Navi Pillay, UN High Commissioner for Human Rights, told The Associated Press.

It's believed there are around 8,000 prisoners being held in 60 detention centres in the war-torn country.

Libyan rebels overthrew Gadhafi's brutal dictatorship - that ended with his death in October - with the help of Canadian air power and support from other NATO countries.

Canada has pledged about $20 million to assist the new government, but has said its priority is to get weapons out of the hands of the country's fractured militias, who control many of the prisons.