UNITED NATIONS - President Barack Obama’s unannounced trip to Afghanistan Wednesday received mixed reaction from Capitol Hill, with Republican lawmakers calling it an attempt to gain political advantage in this election year and Democrats hoping that the U.S.-Afghan accord bring an end to the decade-old war.

Republican Senator James Inhofe of Oklahoma criticized Obama’s trip as “campaign related” and blamed him for the falling public support for the war, saying that the president “refused to articulate the value and importance of the work our troops are doing there.”

“This trip to Afghanistan is an attempt to shore up his national-security credentials, because he has spent the past three years gutting our military. He cut the F-22, future combat system, C-17, and our ground-based interceptor in Poland, to name a few. On top of that, he has tried to close Gitmo — the very source of some of our intelligence that resulted in bin Laden’s demise,” Inhofe said in a statement. “Unfortunately, this president has allowed Washington and campaign politics to dictate his strategy in Afghanistan rather than the conditions on the ground.”

But analyst said the president’s speech from Bagram base near Kabul should at least serve to ease criticism from conservatives in recent months who argued that he was hiding the war from the American people.

For months, House Armed Services Committee Chairman Buck McKeon, a Republican, has demanded that Obama address the nation specifically on Afghanistan. At a keynote speech at the Ronald Reagan Presidential Library in March, McKeon said, “President Bush gave over 40 speeches about the war on terrorism and the importance of victory. President Obama has given three. We must do a better job of communicating the importance of this fight.”

Senate Majority Leader Harry Reid, a democrat, touted Osama bin Laden’s killing a year ago in a statement on Tuesday. “While al-Qaeda’s leader is gone, the organization remains a threat and is motivated to bring harm to our nation, and we will never hesitate to use the full extent of our power to stop the threat of terrorism,” Reid said.

Later in a statement he praised the U.S.-Afghanistan security pact. “Today’s agreement brings us closer to the end of a painful chapter in our nation’s history that started on Sept. 11, 2001,” Reid said in a statement. Nevertheless, there is still a great deal of work to be done in Afghanistan, and I am encouraged that we now have a road map in place to achieve success.” Reid said he looked “forward to continued work with my colleagues in Congress to ensure that our troops have the resources and support they need to carry out their mission.”

House Minority Leader Nancy Pelosi, a Democrat, applauded the signing of the partnership agreement with Afghanistan. “Many of us in Congress have been steadfast in expressing our opposition to an extended military presence in Afghanistan; this agreement moves us toward the day when all U.S. troops have been brought safely home,” Pelosi said in a statement. “We have come to this moment because of the bravery of our troops and the sacrifices they and their families have been willing to make. In Afghanistan, and around the world, they have performed excellently,” she added.

Pelosi also said, “One year ago, with the death of Osama bin Laden, President Obama sent a clear message that we will pursue those who intend to do our nation harm and will never lose focus on our responsibility to keep our nation safe.

“President Obama has reiterated his commitment to the security of the American people and to end the war in Afghanistan responsibly.”

Meanwhile, Senate Armed Services Committee member Lindsey Graham, a Republican, who closely watches the Afghanistan war, issued a statement extolling the agreement as “a turning point” in the war.

“This is a day I have been looking forward to for over two years. I am confident that with proper implementation, this will help secure our nation and allies from future attacks using Afghanistan as a staging area,” Graham said. “The details of the security agreement have yet to be negotiated, but I envision a follow-on force made up of American military power, transport capability, and Special Forces units.”

Graham congratulated Obama and President Hamid Karzai for reaching an agreement, but he also jabbed the administration for sticking with announced plans to draw down U.S. forces this summer and through 2014. “It is imperative Gen. [John] Allen have sufficient forces to continue the fight against the Taliban and al-Qaeda until 2014, when the Afghans take the lead.

 Any further reductions in force, beyond recovering the surge forces, puts the mission at risk and is militarily unwise,” Graham argued.

Republican Kelly Ayotte, along with several other Republicans, embraced Obama’s apparent commitment to retaining forces in Afghanistan. “This strategic partnership agreement signals to friend and foe alike that the U.S. will remain a key security partner of the Afghan people for years to come,” Ayotte said. “A stable and secure Afghanistan is vital to our national security interests.”

Democratic Congressman Adam Smith, the ranking member of the House Armed Services Committee, sounded like a campaign surrogate on Tuesday night, giving Obama’s “decisive leadership” much credit for the death of Osama bin Laden, which he said paved the way for the strategic partnership agreement and the end of the war.

“This announcement underscores the fulfillment of a promise made by then-candidate Obama to responsibly bring the war in Afghanistan to an end,” Smith said in a statement. “Simply put, Osama bin Laden is dead, much of al-Qaeda’s senior leadership has been decimated, and it is time to bring our troops home as soon as we responsibly can. I applaud the administration for continuing to move us toward an end of this conflict. The agreement signed today is a significant step forward for our two nations, and it establishes a new era of our partnership. I look forward to continuing to work with the administration as we responsibly bring the war to an end and ensure our national security.”