Prime Minister Stephen Harper says a ban on private security contractors in Afghanistan will "complicate" Canada's military exit from the country next year.

Afghan President Hamid Karzai announced last week that all private security contractors had to end their operations within four months.

His decree came months after Karzai promised Afghan voters that he would close down all private security operations in Afghanistan by the end of November 2011.

It is believed that as many as 40,000 people are working as private guards in Afghanistan.

But Karzai's aggressive timetable to put private security contractors out of business has left Harper concerned about how Ottawa will protect the diplomats and aid workers who will remain in Afghanistan beyond next year.

"I will certainly concede that President Karzai's recent decision will complicate some of those choices in the future but I'm not in a position today to answer those questions but we are working on them," he told reporters Tuesday at a news conference in Manitoba.

At the moment, private companies provide security at four Canadian operating bases in Afghanistan, which has cost Ottawa $9 million to provide this year.

Foreign Affairs also uses hired guards, but it not publicly known how much money that department spends on private security.

Canadian troops are due to pull out of Afghanistan in July of next year, an exit date the Harper government has said has been set in stone by parliamentary mandate.

But Ottawa has yet to decide precisely what its involvement in Afghanistan will be after the troops leave, other than it will be focused on diplomacy and development.

A recent Globe and Mail report published government documents that suggest Ottawa intends to spend up to $600 million to prevent Afghanistan from becoming a "haven for terrorists."

With files from The Canadian Press