SAN JUAN, Puerto Rico, May 24 -- Sen. Barack Obama swept across this island commonwealth Saturday, a visit that had the markings of a coda to a grueling primary campaign.

"Hóla, Puerto Rico! How's everybody doing today?" Obama shouted to a crowd gathered in Old San Juan, before he led dancing supporters along the seaside battlements for a raucous caminata, the traditional candidate parade. "I am thankful, I am grateful. . . . If we do well in Puerto Rico, there is no reason I will not be announcing that I am the Democratic nominee for president of the United States of America!"

The expected victory by Sen. Hillary Rodham Clinton (N.Y.) in next Sunday's primary here is unlikely to shift the dynamic of the Democratic race. But Puerto Rico is emerging as a field test of what has become one of the first orders of business for the Obama campaign in its transition to general-election mode: redoubling and rethinking its effort to win over Hispanic voters, a demographic it lost to Clinton and will need against Sen. John McCain (R-Ariz.). Last week, Obama courted Puerto Ricans in central Florida and Cuban Americans in Miami, laying down markers in a pivotal state in which the growing Hispanic vote is trending Democratic. This week, he will head to the Hispanic-heavy swing states of New Mexico, Colorado and Nevada.

The challenge: establishing a connection between Obama, a rookie senator from Illinois new to the national scene, and Hispanic voters, a crucial element of the Democratic coalition who have not yet reached the threshold of familiarity that they need to cast their lot with him. That effort is complicated by the diversity of the Hispanic community, in which the interests of predominantly Mexican Americans in the Southwest can be very different from Cuban Americans and Puerto Ricans on the East Coast.

"We recognize we must work very hard . . . to do better with Latino voters in the general election," said Federico Peña, an Obama supporter who served as both transportation and energy secretary in President Bill Clinton's administration. "We're just going to have to do much better. We recognize that. The senator recognizes that."

The plan, discussed in a conference call in the past week among the campaign's top Hispanic supporters, includes immediately ratcheting up Obama's exposure in Spanish-language media; creating a separate fundraising category that contributors can donate to for the purpose of paying for ads in Spanish; registering as many as possible of the 7 million eligible Hispanic Americans not on the rolls; and, in coming weeks, reaching out to Hillary Clinton's major Hispanic backers.

New Mexico Gov. Bill Richardson, the highest-profile Hispanic supporter in a campaign that lacks a Latino in its inner circle, envisions a greater role for surrogates such as himself who can be "validators" of Obama. While campaigning in Puerto Rico recently, Richardson said, he often invoked comparisons to John F. Kennedy -- a hero among many fellow Catholics in Hispanic communities -- to convince voters that Obama is a "young man of enormous potential."

But much of the revamped outreach will be up to Obama. As disparate and far-flung as the Hispanic electorate is, those who study it say Hispanic voters share a tendency to judge politicians as much on how personally comfortable they feel with them as on the issues. ("We know each other" was President Bush's slogan for Hispanic outreach in 2004, a reference to his ties with the community in Texas.) Obama has had little opportunity to do so.

"The majority of Hispanics are at very best confused or uninformed about who he is," said Jorge Mursuli, executive director of Democracia USA, which registers Hispanic voters. "That's not insurmountable. . . . But in the end, any Hispanic who doesn't know him or have a relationship with him in their mind, that is a vulnerable vote that a Republican can nab."

To make up the gap, Obama will engage in more time-intensive retail politicking, which with its undertones of old-style identity politics has not always come naturally to him. "This huge stage [for big rallies] that has allowed so many thousands to feel the excitement has not allowed us to know him," said Rep. Luis V. Gutierrez (D-Ill.), an Obama backer. "We have to bring him down off the pedestal, bring him down to the living room and see him."

And, advisers say, he must find a way to tell the story of his life and campaign in a way that reflects commonalities with Hispanic voters: that he was born to a foreigner who came to America seeking a better life, that he was raised partly by grandparents -- on an island, like many Americans of Caribbean descent -- that he has experienced some of the same hurdles as part of a racial minority, and has overcome them by excelling in his education.

"Hispanics are big proponents of improving your life and advancing yourself through education, and that's his life story," said Freddy Balsera, a Florida political consultant who is helping lead Obama's Hispanic outreach in the state. "When he starts explaining that to Hispanic voters, they're going to connect to him."

This is where Puerto Rico comes in, although its residents cannot vote in November. So strong are the links between the island and mainland that reports of Obama's visit here -- whether via relatives or Spanish-language media -- will only help the campaign build a bond that it realizes has been lacking.

"What happens on this island 2,000 miles from New York and Chicago, we all find out about," said Gutierrez, whose family hails from Puerto Rico.

The stakes are great. In the 2006 midterm elections, Hispanics made up 6 percent of voters, according to estimates by the Pew Hispanic Center, with higher rates in key swing states such as New Mexico (27 percent), Florida (10 percent) and Nevada and Colorado (9 percent). In 2004, Hispanic voters favored Democratic Sen. John F. Kerry (Mass.) in all major states except Florida, where Cuban Americans have tilted the Hispanic vote Republican.

But there are signs Hispanic participation could be much higher this year, in reaction against the recent anti-illegal-immigrant movement, which has unnerved many citizens of Latin American descent, and out of discontent with the war in Iraq and the economy. Mursuli noted that Hispanic turnout in the Democratic primaries had in several states matched general-election turnout in 2004 and said that his group is racing ahead with new registrations.

In the primaries, Obama prevailed among Hispanic voters in a few states, such as Virginia and Connecticut, but Clinton won them easily in most other states. In California, analysts speculated that Obama faced resistance because of "black-brown" tension between African Americans and Latinos there.

The Obama campaign noted Hispanics' greater familiarity with Clinton and her husband and is confident that it will fare better against McCain. Obama's advisers say that although McCain supported an overhaul of the immigration system last year, they will highlight the tougher line he took in the primaries and his party's overall tone on the issue. "There are differences, and they can be clarified and magnified," Peña said.

Florida is looming as the biggest battleground. In the last week, McCain was in Miami to speak to Cuban Americans and harshly criticized Obama for his call to normalize relations with Cuba.

On Friday, Obama ventured before a Cuban American audience to deliver a speech on Latin America, and the numbers suggest he may make inroads. Democrats recently surpassed Republicans among registered Hispanic voters in the state, a combination of a leftward movement among younger Cubans and of the growing numbers of Puerto Ricans (migrating from the island and from the Northeast) and other Latin Americans. In 1988, Cubans made up an estimated 90 percent of Hispanic voters in the state; now they are fewer than half, according to the Florida polling firm Bendixen & Associates.

Such considerations seemed far off Saturday as Obama marched through Old San Juan in barely controlled chaos. "Obama la esperanza y el futuro . . . Y un amigo presidente porque respeta nuestra gente," blasted the song on the sound truck ("Obama the hope and the future/And a friend president because he respects our people").

Here and there, the candidate broke into a few dance steps. "We have great support here in Puerto Rico," he declared at the end. "The most important support is not the support from the elected officials or support from the powerful -- it's the support from the people, and that is what we have shown here today."