Republicans said Friday that President Obama’s decision to air his first TV ad in Virginia shows how desperate he is to try to win the swing state in November.

“It is clearly a sign he is worried about how things are going here in the Commonwealth of Virginia,’’ Dave Rexrode, executive director of the Republican Party of Virginia, told reporters. “He’s desperate.’’

In 2008, Obama became the first Democratic candidate to carry Virginia in 44 years. But in the years since, Democrats have lost ground in what some still consider a conservative Southern state. The GOP will control all of Richmond and holds a commanding majority of Virginia’s congressional delegation.

“Virginia is going to be vitally important to us this cycle,’’ Republican National Committee Political Director Rick Wiley said.

The ad, “Unprecedented,”promotes Obama’s record on energy on ethics. It is also running in Iowa, Michigan, North Carolina , Ohio and Wisconsin.

“There’s nothing desperate about curbing the influence of special interest in Washington and working to end our dependence on foreign oil, which is exactly what President Obama has done,’’ said Melanie Roussell, national press secretary for the Democratic National Committee. “ What’s desperate is a Republican Party whose front-runner can’t seem to shoot straight with the American people about his taxes or record — no wonder that poll after poll show his support collapsing across the country.”