David Cameron is to send more British troops to Afghanistan amid concerns about the deteriorating security situation.
The Prime Minister, attending the Nato summit in Warsaw, will announce that he is to deploy up to 50 additional personnel to help build up the beleaguered Afghan security forces.
They will join the 450 British troops already in the country who had been due to return at the end of this year but will now have their mission extended into 2017.
The move follows the announcement by President Barack Obama that he is to keep the remaining 8,400 US troops in Afghanistan for the remainder of his presidency, further slowing the draw-down of US forces.
Arriving in Warsaw, Mr Cameron said it was essential that Nato continued "to work with the Afghan government and the Afghan security forces to help keep terrorists out of that country".
British officials stressed that the UK personnel would be engaged in "training and mentoring" and would not be taking part in combat operations against the resurgent Taliban.
"It is not mission creep because they are not engaged in a combat capacity. They are engaged in training and mentoring," one official said.
However, the move will be seen as another setback for Mr Cameron, as he nears the end of his premiership, having hoped to end Britain's lengthy military involvement in the county.
Of the additional troops to be deployed, 21 will join the counter terrorism mission, 15 will be involved in a leadership development at the Afghan army's officer training academy - dubbed "Sandhurst in the sand" - and 13 will join the Nato Resolute Support Mission.
In addition, Britain is to extend the £70 million a year funding it provides for the Afghan security forces to 2020, committing an extra £178 million direct to the Afghan government of president Ashraf Ghani.
"It is a reflection of the fact that there is still a job to be done in Afghanistan," a British Government source said.
"While they have made tremendous strides in recent years - it is clear that they still need our support. Not in a combat capacity, but in a Nato mission capacity of training and mentoring and generally improving their means of operation."
Mr Cameron said that underlined his determination that Britain should continue to play a leading role on the world stage despite the referendum vote to leave the European Union.
"Britain is not going to be playing a lesser role in the world. We will make sure that we use our strength, including through Nato, to spread British values and the things that we believe in," he said.