Talan Brooks and his mother were unsure what Christmas would bring this year. Their fitful efforts to get into the city's crowded homeless shelters had come up short. They were living on a friend's couch.

Then someone put them in touch with Jim Kenney.

Next thing they knew, they not only had shelter, but Philadelphia's mayor-elect was taking Talan, 9, on his first Amtrak ride - to a Christmas party at the White House.

The experience left a special bond between the longtime politician and a shy, sweet boy.

It was all "nice," Talan said this week. Kenney said, "I have a new friend for Christmas."

Here's how it came about:

On Dec. 3, Kenney was visiting Jay Cooke Elementary School in the Logan section to announce a new youth basketball center. Cooke is Talan's school. As Kenney was leaving, after-school volunteers Deborah Azore and Ashley Heigl buttonholed him.

They asked Kenney to speak with Talan's mother. ("I told him, 'You ain't walking away from here until you handle this situation,' " Azore said later.)

Tears flowed as Erika Brooks, 43, told her story. She had worked as a personal-care aide, and she and Talan lived in a rental. When the building sold in 2012, they moved in with Brooks' sister, but the sister, too, was struggling, and Brooks and her son, whose name is pronounced TY-lon, wound up staying with a friend.

Kenney promised to help. That night, his aide Mikecia Witherspoon called Brooks to say there was room at a shelter in South Philadelphia, at least until March.

Brooks was grateful, and figured that was that. "I thought I was going to be a piece of paperwork," she said this week.

That is, until Kenney got invited to the White House.

He could bring one guest. That posed a dilemma: Kenney is separated from his wife and has two grown children, "so I can't pick between the two of them." Plan B was to take someone who might not otherwise ever get there.

Witherspoon suggested Talan.

The mayor-elect and his young guest rode the train to Washington. The lavish affair full of lights, food, and VIPs, was "awesome," Kenney said later.

He didn't publicize who his guest was - except to tweet that night, "Talan and I are having an awesome time checking out the White House Christmas Party! Beautiful!!" He sent out snapshots.

It was Kenney's first White House party, too. "There were about 50 trees, one decorated better than the next," he said later, the excitement still ringing in his voice. "The two of us are bobbing around like two kids."

Of the vast spread of food, Talan went straight for the cookies. Gingerbread was his favorite. "He's just pounding the cookies," Kenney recalled, laughing.

Other guests included the parents of Kansas City Chiefs quarterback Alex Smith and officeholders from around the nation.

When President Obama spoke, a staffer fetched Kenney and Talan from the back of the room and brought them to the front. Talan, usually quiet, couldn't contain his excitement. "This kid is clapping like his hands are going to fall off," Kenney said.

After Obama's remarks, the president and his wife went down the front row, greeting guests. When Talan's turn came, Obama hunched down to speak with him, asking what school he went to, how old he was. He answered politely - Kenney made sure of that. ("I was telling him in his ear 'Answer with, 'Yes, Mr. President,' or, 'No, Mr. President.' ")

A judge from Texas standing nearby snapped a photo with Kenney's cellphone. The picture is one Erika Brooks plans to keep forever - her son face-to-face with Obama, as Kenney looks on.

It was Talan's first time riding a train (a little scary, he said, because of how fast it goes), first time eating cocktail shrimp (he's not a fan), and first time dressing up - corduroys, a collared shirt and a Polo sweater, all courtesy of the Kenney campaign.

Talan liked the outfit so much, he wore it to school to show his teacher.

Meanwhile, his mother and the after-school volunteers, Azore and Heigl, have made him a celebrity at Cooke by showing the pictures of Talan with Obama to everyone they know.

"It was an opportunity of a lifetime," Erika Brooks said. "I have to tell him every day about his experience. . . . I don't want him to ever forget this."