(CNN) -- President Barack Obama made a rare presidential visit to Puerto Rico on Tuesday, greeting a cheering crowd to start a five-hour trip aimed as much at Puerto Ricans on the mainland as those on the island.
The roughly 4 million residents of the U.S. Caribbean territory are American citizens but can't vote for president, while the almost 5 million Puerto Ricans living in the 50 U.S. states have full voting rights, and Obama needs strong support in 2012 from what traditionally has been a largely Democratic constituency.
In particular, an influx of Puerto Ricans has come in recent years to central Florida, a key swing state in Obama's re-election campaign. Other states with large Puerto Rican communities include New York and Connecticut.
However, high unemployment and crime rates back in Puerto Rico, as well as the continuing debate over possible U.S. statehood or independence for the island, add uncertainty to Puerto Rican political support.
Obama's trip, the first official presidential visit to Puerto Rico in 50 years, shows "the importance the Hispanic vote has in his re-election campaign," said political analyst Angel Rosa.
Rosa noted that in Florida, Puerto Ricans from the island have boosted the Hispanic population in Orlando and central regions.
Though Gerald Ford traveled to Puerto Rico as president in 1976 to attend an economic summit, the last formal presidential visit was by John F. Kennedy in 1961. That touch of history was commemorated in large banners along Obama's travel route on the island that bear photos of the two Democratic presidents with the year of the visit.
In a brief speech on arrival, Obama mentioned the Kennedy trip, noting that it was the last time a visiting U.S. president spoke to the people of Puerto Rico. Kennedy spoke of the need to improve education and housing then, Obama noted, and he said his administration wants to help the people of Puerto Rico build their future now.
He referred to the March delivery of the latest report by the President's Task Force on Puerto Rico's Status, which recommended that Puerto Ricans should hold a vote sooner rather than later on whether they want full independence, statehood or semi-autonomous status. As an unincorporated U.S. territory, Puerto Rico now receives U.S. protection and is subject to congressional action.
The task force report leaves it to the island's residents to determine their future, Obama said, and "when the people Puerto Rico make a clear decision, my administration will stand by you."
In addition, the task force expanded its focus under orders from Obama and made recommendations on economic development, education, health care and clean energy on the island.
Obama cited the many contributions of Puerto Rico to the United States, including those who serve in the military; entertainers such as Marc Anthony, who was in the crowd; and basketball player J.J. Barea, who just helped the Dallas Mavericks win the NBA championship over the favored Miami Heat.
"That guy can play," Obama said of Barea, adding: "Next time I'm here, I'm going to have to play some hoops."
After his arrival remarks at Muniz Air National Guard Base, Obama toured La Fortaleza, the oldest executive mansion in the Western Hemisphere. He also made an unscheduled stop at a local restaurant -- Kasalta Bakery near San Juan's beaches -- where he greeted patrons and ordered a "medianoche" (midnight) sandwich of ham, pork, Swiss cheese, pickle and mustard combination on sweet bread.
The president attended a Democratic National Committee event before leaving for Washington on Tuesday night.
Puerto Rican Gov. Luis Fortuno described Obama's visit as a "marvelous day" for the island.
"It presented the opportunity to remind the rest of the nation that we have been part of the United States since 1898, that we have been citizens since 1917, and we have fought in each war since then in larger number than most of the states," he told CNN en Espaņol. "And that we also have needs here."
Fortuno said he discussed several issues in a meeting with Obama, including requests for federal government assistance in fighting drug trafficking and finding alternative forms of energy to reduce the island's oil dependence.
He acknowledged that there were political motivations behind Obama's trip but said that didn't mean visits from him and other presidential candidates wouldn't help Puerto Rico.
"It helps that there is more interest in our worries, our anxieties and our aspirations, and what we are looking for is for that interest to translate into action," he said.
Not everyone welcomed Obama's visit. A group of pro-independence demonstrators gathered in a plaza in Puerto Rico's capital and marched to the governor's residence to protest.
"It is a question of honor," said Fernando Martin, president of the Puerto Rican Independence Party. "The idea that the president of a country of which we are a colony comes to Puerto Rico to look for money for his campaign and use the Puerto Ricans as extras for his campaign announcement to get the Hispanic vote in 2012, the very least the independence movement can do is protest."
To some Puerto Ricans, Obama's trip was too short to merit significance.
"I think it's a public relations visit. I say it as a Democrat. This visit does not satisfy me," said Sen. Cirilo Tirado of the island's Popular Democratic Party.
Luis Guillermo Febus, a public employee, called Obama's visit "too fast," adding: "It seems to me that there will not be time for us to talk about serious things and the problems that this country has."
However, private pilot Rafael Pesquera welcomed the visit.
"It is a tremendous, tremendous honor to have him in Puerto Rico," Pesquera said. "I'm an Obama fan, for the way he performs his work, for what he offers."
CNN's Dania Alexandrino, Tom Cohen and Catherine Shoichet contributed to this report.