(Brendan Smialowski — Bloomberg)

From Republicans came warnings that the pullout meant the Obama administration was risking gains made by the U.S. and Iraq since 2003. From Democrats came reflections on all that has been achieved and an argument that the administration, unable to reach agreement with Iraq on the terms of a continuing American presence, had been left with no other choice.

Some of the harshest criticism came from Republicans who have traditionally argued that the administration was losing focus on Iraq as it shifted its attention to Afghanistan.

“Today marks a harmful and sad setback for the United States in the world. I respectfully disagree with the President: this decision will be viewed as a strategic victory for our enemies in the Middle East, especially the Iranian regime, which has worked relentlessly to ensure a full withdrawal of U.S. troops from Iraq,” Sen. John McCain (R-Ariz.) said in a statement. “It is a consequential failure of both the Obama Administration — which has been more focused on withdrawing from Iraq than succeeding in Iraq since it came into office — as well as the Iraqi government.”

Sen. John Kerry (D-Mass.), a key ally for the administration on foreign policy matters, said the president was “following through on his commitment to end both the conflict in Iraq and our military presence,” while Sen. Carl Levin (D-Mich.), chairman of the Senate Armed Services Committee, said the administration was making the right call in “light of Iraq’s refusal to eliminate the possibility that U.S. troops would face prosecutions in Iraqi courts.”

House Speaker John A. Boehner (R-Ohio), who had publicly advocated keeping American troops in Iraq, issued a statement that praised the Obama White House, and the Bush White House before it, for their political leadership on Iraq, but he said he, too, worried that the withdrawal could “jeopardize the gains.” He said he was hopeful that Iraq and the U.S. could work together to ensure continuing peace and security in the country.

Others were less sanguine.

Sen. Lindsey Graham (R-S.C.) said he had to “respectfully disagree” with Obama.

“I hope I am wrong and the president is right, but I fear this decision has set in motion events that will come back to haunt our country,” said Graham.

Graham, along with McCain and Sen. Joseph Lieberman (I-Conn.), had just weeks ago warned that drawing down U.S. troops to as few as 3,000, as had been speculated, could have dangerous consequences.