President Obama on Saturday made his most expansive case yet for why he should be elected to a second term, arguing at rallies in Ohio and Virginia that his work is unfinished and that his presumptive opponent, Republican Mitt Romney, would take the country back to a time when there were fewer opportunities for the middle class.

Speaking beneath blue banners emblazoned with a single word, “Forward,” Obama took credit for shoring up the American dream. The economy is still struggling and needs more time to recover, he said, but his investments in such areas as higher education, infrastructure and clean energy will strengthen the economy and help average Americans get “a fair shot” at success.

The president said Romney would set back the middle class by supporting deep cuts in federal spending, big tax cuts for the wealthy and the repeal of Obama’s landmark health-care legislation.

“Ohio, I’ll tell you what,” Obama told a crowd of about 14,000 supporters in Columbus. “We cannot give him that chance. Not now. Not with so much at stake. This is not just another election. This is a make-or-break moment for the middle class, and we’ve been through too much to turn back now.”

Obama’s reelection team billed the two rallies Saturday as the official start of the general-election campaign and an opportunity to gin up the kind of enthusiasm that helped give the 2008 election its historic sheen. At both rallies, the effort to recapture the magic was evident — in video montages, in volunteer-led chants of “Fired up, ready to go!” and in Obama’s speech.

Both Obama and first lady Michelle Obama, who introduced the president at the events, received roaring receptions. At several points, the crowds interrupted the Obamas and burst out into cheers of “Four more years!”

Despite the enthusiasm, the events took place against the backdrop of a sluggish economy that is far less favorable for Obama than in 2008. As if to sum up the contrast between now and 2008, the Columbus Dispatch greeted Obama’s arrival in Ohio with this headline: “Job numbers don’t mirror hope.”

Romney’s campaign responded to Obama’s speeches by accusing him of trying to change the subject.

“No matter how many lofty campaign speeches President Obama gives, the fact remains that American families are struggling on his watch — to pay their bills, find a job and keep their homes,” Romney campaign spokeswoman Andrea Saul said.

The president’s electoral challenges were also evident in the unfilled arena he addressed at Ohio State University — a situation the campaign scrambled to remedy after boasting early in the day that both rallies would draw overflow crowds. Before Obama arrived in Ohio, organizers redirected the audience to fill the arena floor and other sections that would be visible on TV. As a result, the top tier of the 20,000-seat arena was nearly empty.

Campaign spokesman Ben LaBolt said the Ohio rally still drew four times as many supporters as any event Romney has held this election cycle. At Virginia Commonwealth University in Richmond, 8,000 people filled a smaller arena.

Like many of Obama’s 2008 events, the rallies were intended to showcase the campaign’s technological firepower and to engage supporters and gather information about them to be used through November. Staged on two college campuses, the campaign especially targeted young voters with a sophisticated outreach through social networks.

Campaign workers carried iPads to collect names, contact information and details about what constituencies — such as women, veterans and minority voters — they would most like to help organize. Large screens displayed comments and pictures from supporters and urged them to follow the campaign on Facebook, Twitter and other social networks.

There was a sense of urgency to the day. Both of the Obamas and virtually everyone else who spoke — former Ohio governor Ted Strickland, Sen. Sherrod Brown (D-Ohio), former Virginia governor Timothy M. Kaine — implored their audiences to sign up and give every ounce of energy to what they expect will be a difficult reelection campaign.

“Think about it,” Michelle Obama told the Ohio crowd. “This could all come down to those last few thousand voters who get out November 6th. When you average that out over this entire state, it might mean just registering one more person in your town. So know this: With every door you knock on, with every call you make, with every conversation you have, I want you to remember this could be the one that makes the difference.”

President Obama touched on a broad range of topics to support his argument that the nation would be better off if he wins a second term. He repeatedly cast Republicans as backward and his own agenda as forward-looking. He linked Romney to the policies of congressional Republicans, particularly proposals to make deep cuts in federal spending.

“After a long and spirited primary, Republicans in Congress have found a nominee for president who will rubber-stamp this agenda if he gets the chance,” Obama said.

At times, Obama seemed to be trying to inoculate himself against some of the criticism he has received by acknowledging, for instance, that “not every tax dollar is spent wisely.”

He and the first lady also took several more subtle shots at Romney, particularly his privileged background. Michelle Obama highlighted her own family’s humble beginnings, and the president said that “unless you’re lucky enough to have parents to lend you money,” federal college aid is essential to the nation’s future.

Obama also jabbed at Romney for saying last year that corporations are people. “People are people,” he said.

In a preview of things to come, Obama focused on issues not related to the economy that have come to dominate the political debate, such as the Dream Act, which would benefit foreign-born children of illegal immigrants, and the battle over contraception, a fight that Democrats believe works in their favor.

He also highlighted his foreign policy, an area that came into particular focus last week with the anniversary of Osama bin Laden’s death.

“For the first time in nine years, no American is fighting in Iraq,” Obama told the crowd. “Osama bin Laden is no longer a threat to this country. Al-Qaeda is on the path to defeat. And by 2014, the war in Afghanistan will be over.”

Obama asserted that Romney, by contrast, “said it was tragic to end the war in Iraq.”

“He said he won’t set a timeline for ending the war in Afghanistan. I have. And I intend to keep it,” Obama said. “After a decade of war that’s cost us thousands of lives and over a trillion dollars, the nation we need to build is our own.”

Gardner reported from Columbus and Richmond. Sonmez reported from Washington.