President Obama appealed to the nation Thursday night for another four years in office, asserting that his policies are slowly returning the country to economic prosperity while arguing that his Republican opponents would pursue a course that would set the country back and harm the well-being of middle-class families.

Obama said the choice between him and Republican Mitt Romney represents the clearest in a generation, a choice between sharply contrasting visions and political philosophies. But after entering office in January 2009 amid outsized expectations, he cautioned that the path he offers may be hard but will lead to “a better place.”

“The truth is, it will take more than a few years for us to solve challenges that have built up over decades,” he said. “It will require common effort, shared responsibility and the kind of bold, persistent experimentation that Franklin Roosevelt pursued during the only crisis worse than this one.”

Obama’s speech wrapped up a Democratic National Convention that combined a withering critique of Romney with a defense of the president’s record that Obama’s campaign team hopes will tip a closely fought election in their direction by November. Obama was aided immensely by the other two major speakers, first lady Michelle Obama and former president Bill Clinton.

The president spoke directly to the disappointment among some who supported him, and to the criticism from Republicans that his presidency has fallen far short of the promises he made in 2008.

“If you turn away now,” he said, “if you buy into the cynicism that the change we fought for isn’t possible, well, change will not happen. . . . Only you can make sure that doesn’t happen. Only you have the power to move us forward.”

Pointing to last week’s Republican convention in Tampa, Obama said the speakers there talked more about the country’s problems than about how they would fix them: “They want your vote, but they don’t want you to know their plan. And that’s because all they have to offer is the same prescription they’ve had for the last 30 years.”

Obama’s convention played out against the backdrop of a country still mired in problems caused by the huge financial and housing collapse four years ago this month. The economy’s weakness and the public’s dissatisfaction with Obama’s handling of it pose the greatest threat to his prospects for reelection.

Obama spoke with the jobless rate at 8.3 percent — the 42nd consecutive month it has been above 8 percent — and with the economy adding jobs at a slow pace for months. The latest monthly jobs report will be issued early Friday morning, but economists have forecast little dramatic change in the jobless rate between now and Election Day in November.

He spoke to criticism that his policies have led to a bigger role for government in the economy and people’s lives: “We don’t think government can solve all our problems. But we don’t think that government is the source of all our problems — any more than are welfare recipients, or corporations, or unions, or immigrants, or gays, or any other group we’re told to blame for our troubles.”

Obama belittled the economic proposals of Romney and his running mate, Rep. Paul Ryan. He said Romney’s budget math doesn’t add up, and he vowed never to “turn Medicare into a voucher.” His second-term policies, he said, could cut $4 trillion out of the deficit over a decade, create a million manufacturing jobs by 2016, cut net oil imports in half by the end of the decade and reduce the growth of college tuition by 50 percent over the next 10 years.

Those goals are likely to be closely scrutinized by experts, given the fact that many of the objectives he laid out four years ago have not been met. Obama says that’s because of the depth of the problems he inherited. Republicans argue that it is because he has pursued policies that have made things worse.

He also was sharply critical of Romney’s foreign policy positions. “My opponent and his running mate are new to foreign policy, but from all that we’ve seen and heard, they want to take us back to an era of blustering and blundering that cost America so dearly,” he said. His opponents are “still stuck in a Cold War time warp,” he said, and he made fun of Romney’s recent foreign trip.

Vice President Biden used his acceptance speech to offer personal testimony about the president’s leadership and decision-making. “I’ve seen him tested,” he said. “I know his strength, his command, his faith. I also know the incredible confidence he has in all of you. . . . Yes, the work of recovery is not yet complete, but we are on our way. The journey of hope is not yet finished, but we are on our way. The cause of change is not fully accomplished, but we are on our way.”

Biden focused on two big decisions, the one to bail out the auto industry and the one to take out Osama bin Laden. He summed up Obama’s record, as he has before, by saying, “Osama bin Laden is dead, and General Motors is alive.”

On autos, he said Obama went against the advice of some advisers and others and contrasted the president’s position with that of Romney’s.

Of Romney, he said: “I just don’t think he understood what saving the automobile industry meant — to all of America. I think he saw it the Bain way. I think he saw it in terms of balance sheets and write-offs. Folks, the Bain way may bring your firm the highest profit. But it’s not the way to lead your country from its highest office.”

The decision to go after bin Laden carried even greater risks, with many of the president’s most senior foreign policy advisers opposed. “Bravery resides in the heart of Barack Obama,” he said. “And time and time again, I witnessed him summon it. This man has courage in his soul, compassion in his heart and steel in his spine.”

Biden was introduced by his wife, Jill. A few hours before he spoke, Biden was formally ratified as Obama’s running mate after his name was placed in nomination by his son Beau Biden, the attorney general of Delaware.

Sen. John F. Kerry (Mass.), who was the Democratic nominee eight years ago and gave Obama the keynote address that launched him on the national stage, spoke Thursday night in his capacity as chairman of the Senate Foreign Relations Committee.

Kerry said Obama has restored American credibility and moral authority abroad while keeping his promises to end the Iraq war and eliminate the threat posed by the al-Qaeda terrorist network that struck the country on Sept. 11, 2001. “Ask Osama bin Laden if he is better off now than he was four years ago,” he said.

Kerry argued that the choice in November is clear. “Will we protect our country and our allies, advance our interests and ideals, do battle where we must and make peace where we can?” he asked. “Or will we entrust our place in the world to someone who just hasn’t learned the lessons of the last decade?”

Kerry, who spoke just before a tribute to veterans of Iraq and Afghanistan, ticked through a series of positions Romney has taken on different foreign policy crises. “Talk about being for it before you were against it!” he said, stealing a line of his own that was turned against him in his 2004 campaign. “Mr. Romney — here’s a little advice: Before you debate Barack Obama on foreign policy, you better finish the debate with yourself.”

The evening’s most poignant moment came just before 8 p.m., when Gabrielle Giffords, the former Arizona congresswoman who was shot and gravely wounded in January 2011, led the audience in the Pledge of Allegiance.

Giffords walked slowly across the stage, unaided but accompanied by one of her closest friends in Congress, Rep. Debbie Wasserman Schultz, who chairs the Democratic National Committee. Giffords recited the pledge with a strong, clear voice. As delegates cheered and wiped away tears at the sight of her, she beamed a big smile back at them.

Speakers who appeared before the prime-time hour continued the pattern of the first two nights of the convention, appealing to crucial constituencies by warning that Republicans would take away abortion rights, or educational opportunity. Others skewered Romney as a wealthy, out-of-touch businessman whose record does not match his campaign’s claims that he knows how to turn around the economy.

Former Michigan governor Jennifer Granholm, shouting and pumping her fists through most of her speech, brought the audience to a fever pitch by attacking Romney for his opposition to the auto bailout. In a reference to the renovation of Romney’s California home, she said, “In Romney’s world, the cars get the elevator and the workers get the shaft.”

Obama spoke in the Time Warner Cable Arena after convention organizers scrubbed plans to hold Thursday’s program in the Bank of America outdoor football stadium. Forecasts for more rain and potentially severe weather forced the change in venue. Rain pelted downtown Charlotte on Thursday afternoon, but the skies cleared later in the day.