Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

President Barack Obama on Tuesday announced a plan to maintain 9,800 military personnel in Afghanistan after the American combat mission ends there this year, pledging that he will bring the war there to "a responsible end."

"This is how wars end in the 21st century: not through signing ceremonies, but through decisive blows against our adversaries, transitions to elected governments, security forces who are trained to take the lead and, ultimately, full responsibility," he said in remarks at the White House.

After the long war launched in the aftermath of the September 11 attacks, Obama said, "now, we are finishing the job we started."

Obama said that the 9,800 figure would be cut in half by the end of 2015, and the American contingent would be reduced to “a normal Embassy presence in Kabul” by the end of 2016, as he is close to leaving office.

The president also said that the United States will focus on two narrow missions after 2014 — training Afghan forces and supporting operations against al Qaeda.

Tuesday's announcement brings Obama closer to fulfilling a major campaign promise as his party braces for the midterm elections this fall -- to draw two unpopular wars to a close.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"The bottom line is it’s time to turn the page on more than a decade in which so much of our foreign policy was focused on the wars in Afghanistan and Iraq," he said.

The plan assumes that Afghan leaders will sign a security agreement with the United States. Both Afghan presidential candidates have committed to signing it if they are elected, the official noted.

The presidential runoff is next month. Outgoing Afghan President Hamid Karzai frustrated American decision-making by refusing to sign a security agreement.

The president spoke to Karzai Tuesday morning to discuss his decision, according to a senior administration official.

Republicans offered mixed responses to the president's announcement.

In a statement, House Speaker John Boehner offered early praise for the move but added that "input from our commanders about the conditions on the ground should dictate troop decisions, and not an arbitrary number from Washington."

But, in a joint statement, Sens.John McCain or Arizona, Lindsey Graham of South Carolina and Kelly Ayotte of New Hampshire slammed the decision.

"The President's decision to set an arbitrary date for the full withdrawal of U.S. troops in Afghanistan is a monumental mistake and a triumph of politics over strategy," they said. "This is a short-sighted decision that will make it harder to end the war in Afghanistan responsibly."

And Rep. Buck McKeon, the chairman of the House Armed Services committee, accused the White House of making the move for political reasons.

"I'm pleased the White House met the military's request for forces in Afghanistan," he said. "However, holding this mission to an arbitrary egg-timer doesn't make a lick of sense strategically."

American forces in Afghanistan number about 33,000 today. Obama told troops over the weekend that the 13-year war, the longest in American history, had reached a pivotal point and that Afghan forces are assuming responsibility for their own country’s security.

“America’s war in Afghanistan will come to a responsible end,” the president said in a surprise visit to Bagram Air Base.

In explaining the continued troop presence, Obama said: “After all the sacrifices we’ve made, we want to preserve the gains that you have helped to win and we're going to make sure that Afghanistan can never again, ever, be used again to launch an attack against our country.”

— Peter Alexander, Erin McClam and Carrie Dann

The Associated Press contributed to this report.