What a difference two weeks – and a lackluster debate performance by President Barack Obama – has made for Republican presidential candidate Mitt Romney in key swing states.

Mired in dismal poll numbers in Ohio two weeks ago, a confident and resurgent Romney returned to the Buckeye State and stumped in rural Iowa on Tuesday as new polls show him gaining fast in battleground states and nationally. In one key measure, he marked his first edge over Obama nationally.

“I’ll do everything in my power to strengthen once again the American farm,” a buoyant Romney vowed at an event in Van Meter, Iowa, where he outlined his agriculture policy. “I’ll do everything in my power to strengthen our economy, to create good jobs and rising incomes. I’ll strengthen the values of our homes and communities.”

Obama, working to hold his narrowing lead in Ohio, held a rally at Ohio State University in Columbus and used the final day of voter registration in the state to implore supporters to sign up and cast their ballots on Nov. 6.

“Everything we fought for in 2008 is on the line in 2012,” Obama told an estimated crowd of 15,000. “The American people have worked too hard, and the last thing we can afford to do right now is to go back to the very same policies that got us into this mess in the first place. I cannot allow that to happen. I will not allow it to happen.”

Both candidates and their surrogates fanned across key swing states Tuesday after new polls showed that the election, which was trending Obama’s way before last week’s nationally televised debate, appears to be shifting in Romney’s direction post-debate.

For the first time, the Realclearpolitics.com average of national polls Tuesday found Romney with an edge over Obama, 48 percent to 47.3 percent.

Among the national polls, the nonpartisan Pew Research Center poll found Romney leading Obama 49 percent to 45 percent among likely voters. That was a dramatic surge for Romney from a mid-September survey that found Obama leading 51 percent to 43 percent.

“The debate had a big impact,” said Andrew Kohut, president of the Pew Research Center. “It was (a) turnaround event for Mitt Romney.”

Romney’s supporters have clearly been energized. Eighty-two percen t say they have given “a lot of thought” to the election, up from 73 percent last month, according to Pew. The new figure is 15 percentage points higher than Obama has logged. Romney’s favorable rating is up to 50 percent among registered voters, up 5 percentage points. Obama’s rating is down 6 points to 49 percent.

And the former Massachusetts governor has dramatically closed the gender gap with women voters over the past month, according to the Pew survey. Romney and Obama are tied among women at 47 percent. Last month, Obama led Romney by 18 points – 56 percent to 38 percent – among likely women voters, the Pew poll found.

“The debate has fundamentally changed the race in Ohio and elsewhere – reset the election,” said Mike DeWine, the Republican Ohio attorney general and former U.S. senator. “What people saw on TV in Ohio, people saw across the country: Mitt Romney looked like president, acted like a president, and had a plan.”

A CNN/ORC International poll of Ohio released Tuesday found Obama ahead 51 percent to 47 percent, a 4-point lead instead of the 7- to 10-point lead he enjoyed before the debate.

In Michigan, a poll by the Detroit Free Press this week showed that the 10-point lead Obama held in the state last month has shrunk to 3, which is within the survey’s margin of error.

In Pennsylvania, a poll Tuesday found showed Obama leading Romney 43 percent to 40 percent, a quarter of the pre-debate leads that reached as high as 12 points, according to Siena College of New York.

“Pennsylvania’s 20 electoral votes suddenly appear to be up for grabs, as this poll shows Obama only up by three points despite a large lead in Philadelphia, the west and northeastern Pennsylvania,” said Don Levy, director of the Siena Research Institute.

Romney campaign officials, while pleased with their reversal of political fortunes, said they’re not getting ahead of themselves.

“Polls will go up and down, but most of them taken together tell us the campaign is close and will continue to be close nationally and in these key battleground states,” said Romney senior adviser Kevin Madden. “Part of our focus as a campaign is on finding these voters who still haven’t made up their mind, along with voters who voted for Obama in 2008 but are disappointed in the state of the economy, and persuading them to vote for Gov. Romney.”

Some Obama campaign officials and surrogates explained the polls shift as part of the natural ebb and flow of a presidential campaign and conceded that the incumbent is in for a tough fight in the closing days to the election.

“That’s not a new approach from our end,” Obama campaign spokeswoman Jen Psaki said. “I just wanted to make the point that we’ve always run this race like we’re five points down. We know that there are going to be many ups and downs . . . over the next couple of days. We have blinders on. We’re implementing our game plan. We’re focused on getting our supporters out, communicating the choice, and we’ll sleep on Nov. 7.”

Bill Burton, a former Obama staffer who works for Priorities USA Action, a pro-Obama super PAC, said Tuesday that the overall structure of the race hasn’t changed despite the latest round of polls that show Romney ahead.

He dismissed those polls, including Pew’s, which he said interviewed more Republicans than Democrats than its last survey. “Republicans did some good (with the debate), but the president is unscathed,” Burton said.

Kohut said party affiliation is fluid and oftentimes voters change during the poll. Criticizing that, he said, “is a silly campaign pollster attitude.”