(CNN) - Longtime Republican Sen. Jim Inhofe of Oklahoma criticized President Barack Obama over the president's surprise trip to Afghanistan Tuesday, describing the visit as "campaign related" and an "attempt to shore up his national security credentials."
"We've seen recently that President Obama has visited college campuses in an attempt to win back the support of that age group since he has lost it over the last three years," Inhofe said in a statement. "Similarly, 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."
– Follow the Ticker on Twitter: @PoliticalTicker
A former member of the military and a member of the Senate Armed Services Committee, Inhofe visited Afghanistan two weeks ago. In his statement Tuesday, he said the progress made in the country is "fragile" and accused the president of playing politics with the one-year anniversary of the raid that killed Osama bin Laden.
"The security improvements and the killing of Osama bin Laden a year ago are great American victories that should not be politicized," he said.
Obama has taken heat from many on the right, including Mitt Romney, after his campaign released a recent ad praising the president over ordering the raid in Pakistan.
Romney's campaign, however, has not made a statement on the president's trip to Afghanistan.
While the senator praised the commander-in-chief for visiting the troops, he took issue with Obama's overall handling of the war in Afghanistan since assuming office in 2009.
He argued the president "has allowed Washington and campaign politics to dictate his strategy in Afghanistan rather than the conditions on the ground."
Also while in Afghanistan Tuesday, Obama and Afghan President Hamid Karzai signed the Strategic Partnership Agreement outlining cooperation between their countries once the U.S.-led international force withdraws in 2014.
Senior administration officials maintained on a conference call with reporters Tuesday that the timing of the trip was driven by negotiations over the SPA, not politics.
After 20 months of talks, final details came together in recent weeks. The agreement then went to the presidents for review, the officials said.
However, the officials also acknowledged that the timing coincides with the anniversary death of bin Laden.
– CNN's Rebecca Stewart contributed to this report.