President Obama focused sharply on his rivals’ approach to the economy in this swing state Saturday, arguing that Republican Mitt Romney and Rep. Paul Ryan, his running mate, would give tax breaks to the wealthy and strip away social programs and benefits that middle-class Americans rely on.

In a sweltering high school gymnasium packed with some 2,300 people, Obama singled out Ryan’s budget, saying that the plan would give Romney a tax rate of less than 1 percent while Romney’s plan would raise taxes on middle-class families.

“They have been trying to sell this trickle-down snake oil before,” Obama said. “It did not work then. It will not work now. It’s not a plan to create jobs. It will not reduce the deficit. It will not move the economy forward. It’s the wrong direction for America.”

Obama said that rather than focus on their economic plans, Romney and Ryan have tried to change the subject, concentrating instead on Medicare. Ryan took his message to a retirement community in Florida with his mother in tow, arguing that Obama has “raided” Medicare to fund the Affordable Care Act.

“But I guess they figure the best defense is to try to go on offense,” Obama said, adding that the Romney-Ryan plan undoes the Medicare guarantee. “So here is the bottom line: My plan saves money in Medicare by cracking down on fraud and waste and insurance company subsidies. And their plan makes seniors pay more so they can give another tax cut to millionaires and billionaires.”

In New Hampshire, seniors made up 14 percent of voters in 2008, the year Obama won the state’s four electoral votes, 54 percent to 45 percent, over Sen. John McCain (R-Ariz.).

At both of his rallies Saturday, Obama was introduced by women who said he had a record of tax breaks and helping the middle class.

The visit marked Obama’s third to the state this year.

Romney is something of a favorite son in the Granite State, where he has a vacation home. At an apple mart in Londonderry, where Obama stopped to meet customers and buy some fruit, a crowd of Romney supporters greeted him with shouts of “Mitt! Mitt! Mitt!”

Yet Obama tried to forge some family ties of his own, thanking the crowd later for looking out for his two daughters, Sasha and Malia.

“They were up here for camp for a month. They had a wonderful time, but their parents missed them a lot,” he said. “So we were glad to get them back. But you guys took good care of them while they were up here, so I appreciate that.”

On Tuesday, Obama will kick off a two-day tour of Ohio and Nevada.