Updated

War-weary Republicans and Democrats on Thursday sent the strongest message yet to President Barack Obama to end the war in Afghanistan as the commander in chief decides how many U.S. troops to withdraw this summer.

A measure requiring an accelerated timetable for pulling out the 100,000 troops from Afghanistan and an exit strategy for the nearly 10-year-old conflict secured 204 votes in the House, falling just short of passage but boosting the hopes of its surprised proponents.

"It sends a strong signal to the president that the U.S. House of Representatives and the American people want change," Rep. Jim McGovern, D-Mass., said shortly after the vote.

Obama will begin drawing down some of the troops in July, with all combat forces due out by 2014. McGovern and others fear that the initial reduction will be a token cut of some 5,000, numbers they argue fail to reflect that Osama bin Laden is gone and the United States can't afford spending $10 billion a month on the war.

An Associated Press-GfK poll earlier this month found 59 percent oppose the war and 37 percent favor it, with significant support for Obama's plan to start removing troops this summer.

"Five thousand on July 1 and nothing else, that won't fly," said Rep. John Garamendi, D-Calif. "That will create a great deal of anger."

Twenty-six Republicans joined 178 Democrats in backing the Afghanistan measure. Eight Democrats and 207 Republicans opposed it. In the Democratic-controlled House last July, a similar measure got 162 votes. The tally on Thursday reflected the increasing exasperation in Congress with the costly war, even among the typically more hawkish Republicans.

But among the measure's foes, Rep. Mike Coffman, R-Colo., said the accelerated timetable "would pull the rug out of the entire strategy," and Rep. Mac Thornberry, R-Texas, said "the sacrifice of blood and treasure will be thrown away for considerable impatience."

The divisive issue was part of three days of debate on a broad, $690 billion defense bill that would provide a 1.6 percent increase in military pay, fund an array of aircraft, ships and submarines and increase health care fees slightly for working-age military retirees. The bill meets the Pentagon's request for $119 billion to fight wars in Iraq and Afghanistan.

The House passed the military blueprint for the budget year beginning Oct. 1 on a vote of 322-96.

In another sign of exasperation with war, the House overwhelmingly backed a measure barring any taxpayer dollars for U.S. ground forces or private security contractors in Libya with the exception of those involved in rescue missions of U.S. service members. The vote was 416-5.

Obama angered lawmakers with the amount of consultation with Congress before launching air strikes against Libya in March. Several members also have complained that Obama violated the 1972 War Powers Resolution, failing to seek congressional authorization for the U.S. military role in Libya.

Obama recently said the U.S. involvement is limited in the NATO-led operation. He also has said he would not send ground forces.

Despite a veto threat, the Republican-controlled House moved ahead with several provisions in the bill that limit Obama's authority to reduce the size of the nuclear weapons arsenal and decide the fate of terrorist suspects. The bill also would delay implementation of the president's new policy allowing gays to serve openly in the military and revives an extra engine for a new fighter aircraft that the Pentagon doesn't want.

The Republican-led House bill must be reconciled with a Senate version that is unlikely to include many of the divisive provisions. The Democratic-controlled Senate Armed Services Committee will begin crafting the bill the week of June 13.

The administration opposes language in the bill revising the authorization to use military force established after the Sept. 11, 2001, terrorist attacks. Republican proponents say the provision mirrors what the Obama administration has spelled out as its justification for prosecuting various terrorist cases. Critics say it would give the president unlimited authority not only to detain terror suspects and prosecute them in military tribunals, but also to go to war

The American Civil Liberties Union said the provisions "authorizes a worldwide war against terrorism suspects and against nations suspected of supporting them."

Republicans said the threat has changed since 2001 and Congress needs to respond. An effort by Rep. Justin Amash, R-Mich., and several Democrats to eliminate the provision failed on a vote of 234-187.

The bill would limit Obama's authority to transfer terrorist suspects from the U.S. naval facility at Guantanamo Bay, Cuba, to installations in the United States, even for trial. It also would make it difficult for the administration to move detainees to foreign countries. The dispute over the fate of 170 detainees at the U.S. naval installation elicited the fiercest debate between Republicans and Democrats.

The House added another provision on Thursday, voting 246-173 to require that all foreign terrorist suspects be considered enemy combatants to be tried in military tribunals.

The bill includes a provision that would prohibit money to the administration for removing nuclear weapons from operation unless it reports to Congress on how it plans to modernize the remaining arsenal. The bill also says the president may not change the target list or move weapons out of Europe until he reports to Congress.

Last December, the Senate ratified the New START treaty, signed by Obama and Russian President Dmitry Medvedev in April 2010. The pact would limit each country's strategic nuclear warheads to 1,550, down from the current ceiling of 2,200. It also established a system for weapons inspections.

START stands for Strategic Arms Reduction Treaty.

In threatening a veto, the administration said it objected to the bill's onerous conditions on its ability to implement the treaty. The White House also said the legislation "raises constitutional concerns as it appears to encroach on the president's authority as commander in chief to set nuclear employment policy — a right exercised by every president in the nuclear age from both parties."

In writing the military bill, the House voted to eliminate the Institute of Peace, the independent organization which works to prevent and resolve violent international conflicts and has operations in Afghanistan, Iraq and the Korean peninsula.

Rep. Chip Cravaack, R-Minn., said as the nation struggles economically, it can't afford a duplicative agency whose work can be done by the State Department, Peace Corps or the Defense Department. The Institute got $39.5 million in the current budget.