Canada is spending $20 million over two years to pay the salaries of Afghan police officers and prison guards, Foreign Affairs Minister Lawrence Cannon and International Trade Minister Stockwell Day announced Tuesday in Kabul.

Cannon and Day made the announcement at the end of a two-day visit to Afghanistan, which was kept under embargo until Tuesday because of security concerns.

A United Nations law and order trust fund will administer the cash.

"This amount of money will serve to pay a number of correctional officers on the one hand but also pay for roughly 3,000 police officers in Kandahar province," Cannon said during a press conference in Kabul Tuesday.

"This will enable the officers to receive a salary approximately for the next two years."

In total, Cannon said Canada has contributed about $70 million to the fund.

Of the current contribution, $19 million will pay for the police salaries while $1 million will support the salaries of corrections officers.

That works out to a salary of about $3,166 annually for a member of the Afghan National Police.

"We continue to support and we continue to believe that the way to go forward is to provide security -- that is a must," Cannon said.

"It's extremely important to provide for security because security inevitably will bring stability."

Earlier this month, U.S. President Barack Obama said the U.S. was willing to open the door to negotiating with some moderate Taliban leaders.

The Tories say they agree with Obama's stance on talking with the Taliban.

Cannon reiterated that position during Tuesday's press conference but said certain conditions would have to be met.

"These conditions must be to renounce acts of terrorism, to be able to put aside the weapons and to be able to sit down and discuss," Cannon said. "This is by far the better course of action to take."

Day, the chair of the cabinet committee on Afghanistan, said any attempt to talk with the Taliban would be a decision for the Afghanistan government.

"This is a process that would be led by, engaged by, and moved on by the government of the people of Afghanistan," Day said. "I believe there is great opportunity and great hope for the people of Afghanistan."

The ministers arrived at Kandahar Air Field on Sunday and then headed by helicopter to Kandahar city.

The Globe and Mail's Gloria Galloway, reporting from Kandahar, said the ministers watch a program that helps train police and corrections officers.

On Monday, Day and Cannon visited a new police sub-station as well as Sarpoza prison in Kandahar.

Day spoke to some of the prisoners, including a suspected insurgent.

Day asked about their treatment and was reportedly told that there were no problems.

Two years ago, the treatment of suspected Taliban prisoners became a hot-button issue after reports of torture emerged.

Canada is also donating $1.3 million to the Human Rights Support Unit within the Afghan Ministry of Justice and $350,000 for reconstruction efforts following the February attacks against the Ministry of Justice and the Central Prison Department in Kabul.