WASHINGTON — Barack Obama was always vulnerable to charges that he would be weak on national security.

He was a relative political newcomer with no history of military service. He opposed the war in Iraq and pledged to roll back many of the George W. Bush administration’s toughest anti-terrorism policies.

At one politically perilous moment just months into Obama’s presidency, the young commander in chief appeared at the National Archives to declare a “new direction” in fighting terrorism, only to be scolded as “naive” by former Vice President Dick Cheney, the graying architect of aggressive post-9/11 policies.

But as the country observes the 10th anniversary of the attacks, something once unthinkable has shown up in the polls: National security has gone from being Obama’s big political weakness to his only area of policy strength.

Now potential Republican presidential nominees who eviscerate him on the economy offer grudging credit on terrorism. Texas Gov. Rick Perry, for example, said in last week’s GOP debate that Obama “maintained the chase” to find Osama bin Laden. “I tip my hat to him,” Perry said.

And even Cheney throws out a compliment now and then.

“Guantanamo is still open, they still have military commissions for trying terrorism suspects,” he said recently on Fox News. “And I think you’ve got to give him credit for the operation to get Osama bin Laden.”

The challenge for Obama is to figure out if his record on security might help reassure voters who are turning their backs on him because of doubts about his ability to fix the economy.

So far, that hasn’t happened. Instead, the president who bagged the world’s most-wanted man is perceived as a weakling who was rolled by Republicans in the debt-ceiling debate and whose hopes for a prime-time address to Congress were foiled by GOP opposition and then the starting time of a football game.

The contrast has proved frustrating to the president’s team.

“I don’t think the remaining al-Qaida leadership that’s on the run would think of [Obama] as a weak leader,” said David Axelrod, Obama’s senior campaign strategist. “I think they think of him as a very determined and relentless person.”

A Washington Post/ABC News poll published last week found that 62 percent of Americans, including nearly six in 10 independents and four in 10 Republicans, approve of the job he has done in combating terrorism.

In the same survey, Obama’s overall approval rating stood at a new low of 43 percent. A little more than a third of Americans approved of his handling of the economy, the poll found. Other surveys found that he is increasingly seen as a weak leader.

The dynamic presents difficulties both for Obama and his potential Republican foes, all of whom are trying to gauge the role that national security will play in an election otherwise dominated by the economy. And it creates the unusual prospect of a Democratic president playing the toughness card against a Republican challenger such as Perry or former Massachusetts Gov. Mitt Romney with few if any foreign-policy credentials.

“People will look at the other candidates and will ask hard questions about how they feel they will handle security,” Axelrod said.

He added: “It’s part of what people consider when they elect a president, for sure. Does it supplant the economy debate? No, but I don’t think it’s without meaning. As you tell the story of this president and who he is, that’s certainly an element of the story.”

The 9/11 anniversary, coupled with reports of a credible terrorist threat this weekend, provided Obama with chances to subtly remind voters of his security bona fides.

On Saturday, the president convened a meeting of his national security team to discuss the threat. Then he and his wife, Michelle, visited Arlington National Cemetery’s Section 60, the area for service members who died in Iraq or Afghanistan.

On Sunday, Obama plans to visit the three 9/11 attack sites. In the morning, he will give a reading at Ground Zero in New York City. Then he will lay wreaths in Shanksville, Pa., and, later in the afternoon, at the Pentagon. At each site, he will meet privately with victims’ families.

Sunday night, Obama is scheduled to address the “Concert for Hope” at the Kennedy Center, a speech likely to be televised nationally on cable.

White House officials say Obama’s role at the commemorations will be deliberately “low-key.”

“We don’t need to beat our chests about our success in counterterrorism,” said a White House official, speaking on the condition of anonymity to discuss internal viewpoints. “I think it’s self-evident over the last several months.”

Still, administration officials are taking steps to highlight anti-terrorism achievements when they can, making a case that, contrary to criticism from the left and right, Obama’s successes stem from his policy decisions and not just from those he adopted from the Bush era.

Drawing down troops in Iraq helped shift resources to fighting al-Qaida, the White House official said, and the president made an early choice to revive the hunt for bin Laden, the official said.

In his Saturday radio address, Obama declared that “America is stronger” and that “we’ve taken the fight to al-Qaida like never before.” White House chief of staff William Daley, addressing a 9/11 anniversary event Thursday, said al-Qaida has “lost more key leaders in rapid succession than at any time since 9/11.”

That point is argued in a lengthy background document produced by the White House under the headline “Counterterrorism Actions,” which lists terrorist killings and repeatedly refers to the bin Laden mission as a sign of successful decision making. “Rather than pursuing a one-size-fits-all approach, the Obama administration relies on flexibility and precision, applying the right tools in the right way and under the right circumstances . . . as we did in the case of Osama bin Laden,” the document argues.

Brian Katulis, a foreign policy expert at the liberal Center for American Progress, said it would be “almost inconceivable” that Obama’s re-election campaign won’t highlight the bin Laden killing.

“Ordering the risky operation was a gutsy leadership call on the president’s part, and the success represented a major turning point,” Katulis said.

Even as Republicans credit Obama for his anti-terrorism work, they still see foreign policy as a subject area they can exploit. GOP candidates continue to accuse the president of conducting an “apology tour” for America’s actions.

And GOP strategists see little cost in giving Obama credit for his successes, which they say are a vindication of the Bush administration.

“You don’t get a lot of points for keep on keepin’ on,” said Stephen Hadley, who was national security adviser in the Bush White House. “There’s a lot of continuity, and people will give him some credit for that. But in the campaign, it’s going to be more of an avoidance of criticism than something he’s going to get a lot of mileage out of.”

Staff polling analyst Scott Clement contributed to this report.