The privileged world in which Prince Edward grew up, a world of palaces, polished silver and nobility's obligations, could not have been further from that of the students at Girard College, where hardship — both financial and emotional — are among the criteria for admission.

But Thursday, when Edward visited Girard, the distance between him and the students who greeted him was easily bridged with handshakes, friendly banter, and some gentle ribbing.

His motorcade of Land Rovers and Range Rovers drove through the boarding school's black iron gates at 12:30 p.m., greeted by hundreds of students in burgundy and gray uniforms, lining the circular drive, cheering, and waving handmade paper American and British flags.

The carefully choreographed visit kept the media at a distance, and called for the prince to head directly from the car into the building to attend an invitation-only luncheon. But Edward, who has a history of breaking the rules, turned instead to a group of second and third graders, beckoning them to come close to him so he could chat them up.

"What is your favorite activity?" he asked. "Does anybody like to play music?"

"I love that accent!" one of the children said later, when television crews asked for the dish on their conversation.

"I wanted to ask him if he's rich," said another boy.

The 48-year-old prince, who also carries the title Earl of Wessex, is in Philadelphia for two days as part of the celebration of his mother's 60 years as queen.

He stopped by Girard for two reasons: to plant a yellow magnolia, commemorating a visit in 1860 by his great-great-grandfather, King Edward VII, who planted two horse chestnuts on the campus. And to honor 17 Girard students participating in the Duke of Edinburgh Award.

The award, which was started by Edward's father in 1956, is designed to build character in young people through community service, physical activity, developing personal skills, and participating in a team project.

It operates in 132 countries and is open to anyone age 14 to 25, but wasn't launched in Philadelphia until 2009.

Edward, who serves as chairman of the award's international governing board, is himself a graduate of the program, which offers nonacademic challenges to help students figure out who they want to be and how to make a contribution to society.

"I don't know about you, but academic work was never really the thing that made me get up in the morning," Edward once admitted to a group of students in Washington.

However silken his early life may have been, when the potential (if distant) heir to the English crown brought home C's and D's, that had to be rough. Despite his poor grades, he went to Cambridge and earned his university degree, then joined the Royal Marines, but dropped out four months into his one-year training as an officer cadet.

His royal parents were not pleased.

He veered off his appointed path again when he sought a career in theater — eventually running a struggling production company — then marrying a commoner, who was a public-relations executive.

Compared with what most Girard students have endured, the bumps in Edward's road were mere pebbles.

In her 13 years teaching at Girard, Anne Smirga said, every one of her students has come from a broken home where sadness and suffering are the norm.

"There is a lot of incarceration. Deaths in the family. Their circumstances leave them with a hole in their life. But when they come here, we build them back up."

Smirga, whose second graders were among the lucky ones interviewed by the prince, said she was surprised and impressed at how down-to-earth he seemed. "For all the pomp and circumstance you see on television, it's so neat that he's here on campus doing something as simple as planting a tree."

After lunch, Mayor Nutter accompanied the prince to a white tent where the yellow magnolia had been pre-deposited in the ground. After a few pro forma remarks, Nutter offered Edward the microphone.

Not expecting to make any public statement, he hesitated at first, then stepped up, game for the challenge. Affable and soft-spoken, he clasped his hands and leaned forward.

"I love surprises," he said. "It's a great pleasure to be here at long last."

In reference to the longevity of his great-great-grandfather's trees, he turned to the crowd of students and asked, "Now, who's going to be responsible for looking after this one?"

A girl raised her hand. "Very good," the prince said, joking, "So if it doesn't last so long, I know who to come after!"

Jason Truong, one of the 17 Girard students in the award program, who all refer to themselves as "Dukes," joined when it was first launched in Philadelphia three years ago.

Truong enrolled at Girard in third grade with help from a social worker after his father died and his mother, a Vietnamese immigrant who worked in a candy factory, was struggling to support him and his four older siblings.

Challenged by the Dukes, he said, he has mentored younger students and served as captain of the tennis team. Now a senior, he is headed to Wharton next fall.

During his private meeting with the Girard "Dukes," Prince Edward asked Truong a question. The moment was at once unforgettable and fleeting.

"I can't remember what he asked me," Truong said. "But my answer was 'No.' "

After Girard, the prince visited program participants from the Science Leadership Academy and Valley Forge Military Academy. He then went to Independence National Historical Park, a private reception, and then an invitation-only dinner at the Restaurant School.

Friday, he was scheduled to attend a breakfast hosted by the British American Business Council of Greater Philadelphia, during which GlaxoSmithKline would be thanked for a recent contribution of $5 million to the city's youth, including $500,000 for the Duke of Edinburgh's Award. The Philadelphia visit is part of Edward's tour of several U.S. cities including Chicago, New York, and Birmingham, Ala.

Contact Melissa Dribben at 215-854-2590 or or dribbenonphilly@twitter.