The British army is to help set up a military academy in Afghanistan to train members of its armed forces.
The project, dubbed "Sandhurst in the sand", could see up to 200 UK troops mentoring future Afghan officers.
The UK plans to withdraw most of its forces from Afghanistan in 2014, when it says their combat role will end.
Defence Secretary Philip Hammond said the UK was committed to ensuring Afghan troops can then "take over the job effectively".
The Afghan National Officers Academy will open in Qarga, to the west of the capital Kabul, in 2013.
Mr Hammond, who is visiting Afghanistan, said the centre will be "modelled on" Sandhurst - where future officers in the British army have been trained since the early 19th Century.
Two-thirds of its foreign instructors will be British but the cost of the project has not been disclosed.
Nato forces are seeking to progressively hand over control of security across the country in the run-up to 2014, when the majority of their 130,000 troops will leave.
The Afghan army has grown steadily in size and is scheduled to reach a peak of 195,000 soldiers by October. Including police, the country will then have a 352,000-strong security force.
"The future for this country is an effective transition to Afghan national security forces," Mr Hammond told BBC Radio 4's Today.
"Our role is to make sure those security forces can take over the job and do it effectively."
Mr Hammond said the UK's role in officer training would continue after 2014, as would financial support for the new facility to illustrate its commitment to Afghanistan's long-term stability.
He has been in Afghanistan for talks with senior officials and has visited British troops in Helmand, where he attended a vigil for three servicemen killed in the past week.
The rate at which the UK's 9,500 troops are withdrawn between now and 2014 would depend on conditions on the ground and decisions made by the UK's partners - including the US - Mr Hammond said.
More than 400 UK service personnel have been killed in Afghanistan since 2001.
One in seven deaths of Nato troops this year have been at the hands of members of the Afghan National Army.
On Monday, Sergeant Luke Taylor, of the Royal Marines, and Lance Corporal Michael Foley, of the Adjutant General's Corps were shot by an Afghan soldier outside UK forces' headquarters in Helmand province.
Although "tragic", Mr Hammond said these attacks were "few and far between" and did not reveal systemic problems with the Afghan army, whose relations with UK forces were "extremely good" in general.