The prime minister was on the same page with some of his biggest NATO allies, offering some of his toughest criticism of Afghanistan President Hamid Karzai.
It came after NATO and Afghanistan signed a long-term partnership agreement intended to signal to insurgents that the alliance will never turn its back on the country, even when it withdraws its combat troops in the years to come.
Karzai asked NATO leaders and coalition partners to step up the flow of the billions of aid dollars to his government instead of filtering it through international organizations operating in the country.
The Afghan government directly receives 20 per cent of international aid dollars but Karzai wants to see that increased to 50 per cent.
"We will not dispense a dime to the government of Afghanistan unless we are convinced that that money is spent in the way it's intended to be spent," Harper said at the end of a two-day NATO summit in Lisbon.
Harper and fellow NATO leaders made it clear to Karzai during crucial talks on the future of Afghanistan that they want him to do more to weed out corruption, sources told The Canadian Press.
Harper told the special expanded session that the international community has made a huge commitment to Afghanistan and that must be balanced by a commitment from the Afghans to improve governance and deal with corruption, said a source who attended the closed-door meeting.
Afterwards, Harper told reporters that it is no secret Afghanistan's government has "challenges."
"But addressing those challenges can not stand in the way of the necessity, the absolute necessity of addressing the core reason of why we went into Afghanistan. And that is assuring that Afghanistan is a secure enough state capable of handling its own security so it does not again become a global threat. That is job number one."
U.S. President Barack Obama said there are "real tensions" in the relationship with Karzai.
"He's also got to pay attention to our concerns as well. I don't think that's unreasonable," Obama said.
"There is going to have to be a constant conversation to make sure we're moving in the right direction. And sometimes that conversation's pretty blunt."
Karzai said his government and people were committed to forming a good "partnership" with the international community to reach NATO's 2014 handover target and continue rebuilding his country.
The Afghan leader said he welcomed Canada's continued support as it plans to withdraw its troops from Kandahar next summer and take on a three-year, non-combat military training mission.
"Canada has been at the forefront of assistance to Afghanistan from the very beginning. The Afghan people are extremely grateful to the Canadian contribution to the well being of the Afghan people," Karzai said.
"I'm sure as it was announced today by Prime Minister Harper that Canada will continue to assist Afghanistan with the training of the Afghan forces and with the reconstruction... We are very grateful for that."
NATO Secretary General Anders Fogh Rasmussen said the joint NATO-Afghan strategy was on track to meet its goal of pulling out its combat troops by the end of 2014. NATO wants to hand over control of security to Afghan military and police by then, ending the combat mission of foreign forces.
Harper maintained the Canada's military presence will end in Afghanistan in March 2014. He said Canadians would remain after then, but only in a development and humanitarian aid capacity.
"I think some allies think it is essential that at least some elements of NATO keep the message to the Taliban that they're prepared to stay if necessary. That's not Canada's position."
Afghanistan is "a proudly nationalistic country that really doesn't welcome foreign troops very well over the long term," Harper said in an apparent reference to the Soviet Union's ill-fated decade of occupation in the 1980s.
"The success of this mission does depend, in my judgment, on foreign troops actually leaving in a reasonable time frame but doing it in a way that is successful."
Some 260,000 Afghan military and police have been trained and NATO is on track to meet its goal of 300,000 fully trained security forces by the end of next year, said Rasmussen.
The alliance will begin pulling out of more peaceful parts of Afghanistan early next year, but it won't say where because it does not want to embolden Taliban insurgents.
Canada is committed to assisting that transition with a 950-member, non-combat military training mission that will teach Afghan forces until March 2014.
Canada's contribution to the training mission is seen as crucial for the transition to be successful.
"I hope the Canadian decision will serve as a good example for the rest of the allies and partners," Rasmussen said.
During NATO's expanded Afghanistan meeting, Harper won praise from German Chancellor Angela Merkel for the "difficult" decision he took to extend Canada's military presence in Afghanistan by three years, a source told The Canadian Press.
The source quoted Merkel as saying Germany would host a special international meeting next year in Bonn on Afghanistan.
In the meeting, Karzai told NATO leaders he wants more regular contact with his western partners, said the source.
The move would be symbolic because it would come exactly a decade after the first historic Bonn conference that installed Karzai as Afghanistan's leader in the aftermath of the ouster of the Taliban after the Sept. 11, 2001, attacks.
The hopeful glow of the original Bonn conference has long since faded with the deterioration of Karzai's relations with the international community over the years.
Karzai arrived in Lisbon after a very public clash a week ago with U.S. Gen. David Petraeus, who commands the NATO-led mission in his country. It was Karzai's latest run-in with his western partners, who have long-standing concerns about corruption in his government.
Karzai appeared contrite Saturday, and determined to leave past differences behind now that he had signed his new long-term pact with NATO.
"I hope that as we move forward many of these difficulties will go away."
Harper expressed some sympathy for the Afghan leader, saying he has good relations with him, noting that Karzai is the elected leader of Afghanistan.
"Mr. Karzai is the choice of Afghans. We can't forget that."
In the meeting, other leaders, including Obama and French President Nicolas Sarkozy raised the corruption issue with Karzai, the source explained.
NATO expects a long-term engagement in Afghanistan after it ends its combat operations. Rasmussen has said he expect western militaries to be actively engaged in the country from 2015 onwards, likely in training missions.
Harper also held bilateral talks Saturday with the prime ministers of Britain and The Netherlands, David Cameron and Mark Rutte. Troops from both countries have fought along side the Canadian Forces in southern Afghanistan, but the Dutch ended their combat mission earlier this year.
NATO leaders also met with Russian President Dmitry Medvedev. It marked the first time NATO and Russia have met since Moscow's 2008 invasion of Georgia soured relations with the alliance.