WASHINGTON (AP) — A White House spokesman says it's important for the U.S. and Afghanistan to sign a new security pact by the end of the year.

That's just hours after Afghan President Hamid Karzai said he prefers his successor sign the agreement after elections in April.

Spokesman Josh Earnest says prompt action is crucial to U.S. military planning, as well as planning by NATO allies that also have a troop presence in Afghanistan.

The security agreement could clear the way for the U.S. to keep thousands of troops in Afghanistan after the war formally concludes at the end of 2014. But Earnest says the president has not decided whether he'll keep troops in Afghanistan.