Canadian Prime Minister Stephen Harper on Thursday made a surprise visit to southern Afghanistan, where Canada has deployed some 2,800 troops as part of a NATO-led mission to rout insurgents.

In a televised address from Kandahar airfield, Harper thanked soldiers for their efforts and announced funding to educate 18,000 Afghan boys and girls.

Two million Canadian dollars (1.7 million US) in funding, in addition to 4.5 million dollars (3.8 million US) announced in March, would be used to build and reconstruct 50 area schools, furnish classrooms and bolster literacy programs.

It will be disbursed through UNICEF, said a government statement.

Harper, who traveled to Afghanistan from Prague where he met with European leaders, said: "As part of the family of civilized nations, we have a national obligation to do our part to contribute to (Afghan) peace and security."

"It is our moral obligation to share our freedoms and our opportunities with the citizens of the world who for too long endured violence, oppression, and deprivation," he said.

Harper underscored the transformation of Canada''s Afghan mission from a combat role to reconstruction and development, citing a doubling of civilian aid workers and the training of Afghan troops and police to provide security.

"Our mission is to leave Afghanistan to its people as a viable country, as a more peaceful country, a country in control of its own destiny," he said.

Canadian troops are scheduled to leave Kandahar in 2011. Since the start of its mission in 2002, 118 Canadian soldiers, two aid workers and a senior diplomat have died in the war-torn country.