DENVER — Sen. Barack Obama moved to deal with two potential weaknesses when he named Sen. Joseph R. Biden Jr. as his vice presidential running mate Saturday. Biden shores up Obama's inexperience on national security issues and brings to the ticket a politician eager to lead the attack against Republican Sen. John McCain.

The choice of Biden could produce another benefit for Obama and the Democrats. Biden's opening speech at a joint appearance with Obama Saturday in Springfield, Ill., not only included tough words about McCain but also underscored his potential to sharpen the campaign's message on middle-class economic issues that are paramount with the electorate.

But the voluble Biden is not a risk-free running mate for Obama. Republicans were quick to remind people that during the Democratic nomination battle, Biden described Obama as not ready to be president. More significantly, they also see Biden as a potential gaffe machine likely to distract attention from Obama. That view, stated more gently, was shared privately even by some Democrats on Saturday as they assessed a choice that in almost all other respects drew widespread praise within the party.

The die may have been cast for Biden when Russian forces invaded Georgia earlier this month. Until then, Obama may have believed he had more latitude in his choice, that he could worry less about dealing with his perceived weaknesses and instead pick a running mate who would more clearly buttress the change and generational messages at the heart of his candidacy.

Once the tanks rolled, the weight of evidence shifted toward someone who would raise no questions in the area of national security. The "first do no harm" criterion in vice presidential selections became vital. Among those under serious consideration, the 65-year-old Biden was at the top of the list on national security credentials.

Biden also has a powerful personal story, and the Obama campaign was quick to try to capitalize on it. In parallel speeches, Obama described Biden as a symbol of the American Dream, and Biden then returned the favor for a politician whose biracial heritage and unusual biography have left some voters uncertain about who he is.

"Barack and I come from very different places," he said, "but we share a common story, an American story."

That is a theme likely to become more and more prominent.

His long service in the Senate also has included time as chairman of the Judiciary Committee, giving him experience in judicial appointments and crime legislation. He has strong ties with organized labor, which does not know Obama nearly as well.

Though by now a Washington insider, Biden fits the profile of the kind of voter Obama struggled to attract in his nomination battle against Sen. Hillary Rodham Clinton. He is a Roman Catholic with working-class roots from hardscrabble industrial heartland.

He grew up in Scranton, Pa., and it could be his relatives that Obama had in mind when he made his now-famous comment about people whose bitterness over their economic plight leads them to cling to religion and guns. He is likely to spend much of his time over the next 2 1/2 months campaigning in the crucial industrial battlegrounds of Pennsylvania, Ohio and Michigan.

Biden's persona and political personality are in so many ways the antithesis of Obama's. Obama speaks with soaring and often inspirational rhetoric; Biden may be windy, but he is also direct, blunt and plain-spoken. Obama may seem aloof. Biden is always in your face. Obama offers high-altitude passion, Biden's is ground level. Who else but Biden might have introduced his wife to the American people as "drop-dead gorgeous"?

Republicans jumped on the choice of Biden, who has spent more than three decades in the Senate, as one that undermines Obama's change message. Obama advisers were on TV Saturday pointing out that Biden has never become a creature of Washington, noting that he rides the train home to Delaware every night.

On the central foreign policy issue of the campaign, Obama and Biden began in different places. Obama opposed the invasion of Iraq, while Biden supported it. Even as late as the spring of 2007, they were on opposite sides in a vote on funding the war, with Obama opposed and Biden — pointedly among Democratic senators seeking the nomination — in favor.

Republicans will look to exploit those differences and use them to undermine Obama's criticism of McCain's judgment on the war. But Biden also has been one of the most prominent and vocal critics of Bush administration policy in Iraq and has pushed for significant changes in policy for some years.

Biden proved during the primaries that he is a skilled debater — another attribute that recommended him to Obama. Voters ultimately do not make their November decisions on the basis of running mates, but the vice presidential debate will be one moment when the choice matters.

But the real debating Biden will be expected to do will be with McCain. As he made clear on Saturday, he and McCain are friends of long standing and there is mutual respect between them. But that did not prevent him from leveling a series of attacks against McCain as a creature of President Bush's foreign and domestic policies and a senator of questionable judgment.

"I've known John for 35 years," he said. "He served our country with extraordinary courage, and I know he wants to do right by America. But the harsh truth is ... you can't change America when you boast. And these are John's words, quote: 'The most important issues of our day, I've been totally in agreement and support of President Bush."'

At another point, he drew this contrast between Obama and McCain: "These times call for a total change in Washington's world view. These times require more than a good soldier. They require a wise leader. ... A leader who can deliver the change we need."

A Democrat who is a Biden admirer and who watched Saturday's performance said, "This is not going to be a reticent vice presidential candidate."