The trip was a fitting end to the West Coast swing of their U.S. journey, which has had a back-to-basics theme of organic farming and environmental stewardship.
The royals began their tour of the Empress Hotel near downtown San Francisco by meeting Mayor Gavin Newsom and former supervisor Angela Alioto, who worked on the city's 10-year plan to combat homelessness. Also present was Philip Mangano, appointed by President George W. Bush to head the U.S. Interagency Council on Homeless.
Charles and Camilla visited the rooms of two residents of the hotel, which is part of the city's Direct Access to Housing Program, and later had a round-table discussion with Newsom, and city and hotel staff.
"He's a very charming person," said Rene McIntyre, 48, a former music teacher who was one of the people visited by the royal couple. "I think he understood and he put me at ease. I think he really wanted to hear the personal side of the homeless issue."
The prince also visited John Panzer, 42, who got a laugh when he praised the job Newsom was doing just as the mayor appeared in the doorway. Newsom responded by whipping out a credit card in mock payment to Panzer for the compliment.
Residents and city officials were impressed with Charles' grasp of and interest in the problems of homelessness.
And Alioto saw the visit as a milestone, of sorts.
"If you had told anyone two years ago that Gavin Newsom and Angela Alioto and the Prince of Wales would be standing in a successful, supportive housing program in San Francisco, no one in a million years would have believed you," Alioto said after the visit. "That's what you call a city working together for serious results in a human crisis situation."
Charles and Camilla were flying back to Britain Tuesday after a trip intended to underscore trans-Atlantic ties, promote Charles' environmentalist causes — and burnish the profile of the middle-aged royals, who married in April after an on-off relationship lasting more than 30 years.
Charles' Clarence House office said the prince and duchess were "delighted" with the reception they had received on the trip, which included stops in New York, Washington, New Orleans and the San Francisco area.
The couple hobnobbed with stars including Sting and Yoko Ono in New York and took both lunch and dinner with U.S. President George W. Bush and his wife Laura at the White House.
The once-frumpy Camilla swapped her tweeds for an array of designer dresses and glittering accessories — including a sequined Union Jack handbag.
On Monday, the couple visited the "edible garden" at Martin Luther King Jr. Middle School in Berkeley, a kitchen garden converted from waste ground where students grow and prepare their own food.
Charles and Camilla were greeted by Maria Shriver, wife of California Governor Arnold Schwarzenegger, and Berkeley chef Alice Waters as they met pupils preparing food in the school kitchen and examined a composting operation.
The British media have long held that many Americans remain in thrall of the glamour of Princess Diana and the fairy-tale romance of her marriage to the prince. Camilla is the villain of that story the woman Diana meant when she said "there were three of us in that marriage."
But only a handful of Diana die-hards dogged the tour, vastly outnumbered by Camilla well-wishers.
Many Americans — especially women — seemed won over by the down-to-earth triumph of the middle-aged royals' long-burning love.
In Point Reyes Station, California, Cari Lee, 45, waited outside a farmers' market holding a sign reading "We love Their Royal Highnesses Charles and Camilla."
"I'm a newlywed as well, so I understand their bliss," she said.