Congress has reliably defeated efforts to end the Afghan War on the back of strong support from a number of Representatives who have never seen a war they didn’t like. Today’s highly anticipated vote was assumed to be a defeat before it began, but turned out extremely close.

Indeed, though the amendment was defeated, it lost only 204-215, and carried more than 90% of the sitting Democratic representatives. With the bipartisan bill also carrying a number of freshmen Republicans’ support, a couple of shifts here or there could have actually swung the vote the other way, and left President Obama’s ambition to keep the war going beyond 2014 in an awful mess.

The amendment would’ve called on the administration to begin wrapping up the war and negotiating a settlement that would allow for a pullout. A much more aggressive version sponsored by Rep. Chaffetz (R – UT) was also voted on, falling 123-294.

The Chaffetz Amendment was far more ambitious and would’ve required a full withdrawal of all US forces from Afghanistan within 60 days. The closer amendment, sponsored by Jim McGovern (D – MA) did not set any explicit dates.

The loss is still surely a disappointment, but when one considers that the 2010 vote on materially the same amendment got only 138 yes votes, there is no doubt which side the momentum is on. It also means the 2012 vote, and surely there will be one, will not be presumed to be a “slam dunk” for the administration going in.

The combination of the two votes also shows that the antiwar sentiment is surprisingly deep. The Chaffetz amendment still managed to carry a solid majority of President Obama’s own party, and the McGovern amendment came within a hair’s breadth of passing.

Polls have long showed the American publicly squarely against the already decade-long war. Today’s vote suggests that while Congress has still not caught up with public opinion, they are coming around slowly but surely. Assuming that the war continues to grow less popular throughout the year, both amendments can probably count on picking up additional support among representatives ahead of the 2012 election.

Not only that, but the votes show Republican opposition growing largely on the basis of incoming freshmen. This suggests that while the “old-hand” politicians can be stubbornly reluctant to abandon an unpopular conflict they voted for at one point, as they get filtered out this lingering support eventually crumbles. Despite administration claims to the contrary, public opposition can eventually end America’s wars.