Updated

Two years is a long time in war, and the Pentagon is fond of saying the enemy usually gets a vote in the endgame. But that didn’t stop President Obama from declaring at the start of the NATO summit in Chicago that the Afghan war is over, as of December 31, 2014.

Afghan President Hamid Karzai welcomed the pronouncement, “so that Afghanistan is no longer a burden on the shoulder of our friends in the international community -- on the shoulders of the United States and our other allies.”

But Defense Secretary Leon Panetta issued a word of caution.

“The biggest challenge is a Taliban that is resilient, that is going to continue to fight even though they've been weakened," Panetta said. "And I think the levels of violence are down, that they're going to continue to conduct attacks, and we are going to have to confront them.”

Since the president failed to convince NATO leaders to pick up their share of the annual $4.1 billion needed to fund 230,000 Afghan troops after the withdrawal, the U.S. will shoulder most of the burden of funding Afghanistan's army. The European allies only committed to pay about 10 percent of the bill.

More On This...

With Afghanistan’s annual revenues only totaling $1.7 billion, the country would only be able to pay for about 30,000 troops.

"At the end of the day, it is less expensive to finance the Afghan security forces to do the combat than to deploy our own troops," NATO Secretary General Anders Fogh Rasmussen said in Chicago.

He denied, however, that NATO is facing a shortfall in funding.

“The fact is this summit was not intended to be and has not been a pledging conference,” said Rasmussen.

The White House manage, however, to get the European allies to buy unmanned aerial vehicles, a squadron of Global Hawk drones, so that the United States won't be the only member with advanced surveillance equipment -- a shortfall that forced the U.S. to take the lead in Libya.

That NATO purchase means a $1.7 billion windfall for U.S. defense contractor and plane manufacturer Northrup Grumman.

The alliance also agreed to take over responsibility for a controversial European missile defense system that has strained relations with Russia.

But on the issue of military supply routes into Afghanistan, Obama did not make headway with the president of Pakistan, Asif Ali Zardari, who accepted an invitation to the summit at the last minute.

On the eve of the meeting, Pakistan demanded NATO pay $5,000 per truck that passes into Afghanistan to supply the troops -- a substantial increase from the $250 per vehicle prior to a November incident in which U.S. troops killed 24 Pakistani soldiers in a cross fire incident on the border. The president refused to meet him except on the sidelines.

The supply route has remained closed since November, costing the U.S. and NATO an estimated $38 million a month in excess fees as they reroute supplies through a northern corridor in Central Asia.

Despite the lack on resolve on the issue of supply routes, Panetta said that he thought it was positive that the president of Pakistan attended the summit.

“We still have a ways to go, but I think the good news is that we are negotiating and that we’re making some progress,” Panetta stated during a news conference. “At this stage, I guess I would say that I -- I feel a lot more positive about the effort to try to see if we can find a resolution to that challenge.”

Obama requested from Congress $2.1 billion in foreign aid last year and has requested $2.23 billion for next year.