The UN Security Council has extended the mandate of the Nato-led force in Afghanistan for the last time before it hands over responsibility for security to Afghan forces at the end of next year.
A resolution adopted unanimously by the council said the situation in Afghanistan "still constitutes a threat to international peace and security".
The international force has dropped dramatically in strength ahead of the handover - down from 130,000 troops two years to just over 87,200 on August 1, including 60,000 Americans.
The council extended the force's mandate until December 31 next year.
Its action followed an outburst this week from Afghan president Hamid Karzai alleging that the US and Nato inflicted suffering on the Afghan people and repeatedly violated its sovereignty.
The resolution expresses serious concern about security in Afghanistan, pointing to continuing violence and terrorist activities by the Taliban, al Qaida, and other extremist groups as well as by criminals and those involved in the illegal drug trade.
The Taliban have escalated attacks in recent months as they try to take advantage of the withdrawal of foreign troops. In June, Afghan forces took the lead for security nationwide, leaving the Nato-led International Security Assistance Force (Isaf) in a supporting role.
Despite Mr Karzai's critical remarks, the US administration is still optimistic that a US-Afghan agreement over the future role of American troops in the country can be finalised in the next few weeks.
Mr Karzai made the comments on the 12th anniversary of the start of the American campaign in Afghanistan against al Qaida that ousted its Taliban allies from power. The invasion was in response to the September 11 attacks on the United States, which claimed nearly 3,000 lives.
The Security Council welcomed a 2010 agreement between Nato and Afghanistan to provide practical support to improve Afghanistan's "capacity and capability to tackle continued threats to its security, stability and integrity".
It encouraged Isaf and other partners to accelerate the training and mentoring of the Afghan National Security Forces, now numbering more than 350,000 men and women.
The council said the goal is to have an Afghan force that is "self-sufficient, sustainable, accountable and ethnically balanced", and is able to provide security and ensure the rule of law throughout the country.