WASHINGTON — For all the Cubs did for generations of fans throughout a city, President Barack Obama held them up as an example of unifying power in a much larger context.

“It is entirely appropriate that we celebrate the Cubs today, here in this White House, on Dr. Martin Luther King’s birthday,” Obama said during the team’s White House visit on Monday, “because it helps direct us in terms of what this country has been and what it can be in the future.”

Twenty-one players from last year’s World Series champion, the coaching staff, manager and key front-office members and ownership stood at Obama’s back as the president recounted their exploits, joked about his allegiance to the White Sox, compared David Ross’ “yearlong retirement party” to his own and then used the moment to make this young, likeable, diverse Cubs team a symbol for perseverance, hope and connection.

“Sport has had this power to bring us together, even when the country’s divided,” he said. “Sports has changed attitudes and culture in ways that seem subtle but that ultimately made us think differently about ourselves and who we were.

screen-shot-2017-01-16-at-7-00-36-pm

“It is a game and it is a celebration. But there’s a direct line between Jackie Robinson and me standing here. . . . Sports has a way sometimes of changing hearts in a way that politics or business doesn’t.”

Said Cubs manager Joe Maddon afterward: “It’s a powerful moment. It’s a very humbling moment, to be part of this segment of Cubs history. . . . And to do it on Martin Luther King Day also, to be brought here is pretty special.”

Known political divisions were on display: conservative members of the Ricketts ownership family — including Todd, Donald Trump’s selection for deputy commerce secretary — shared the stage with and Obama and Clinton supporters Laura Ricketts and team president Theo Epstein.

But this was a day of consensus.

“That was the best sports ceremony ever,” chairman Tom Ricketts said.

The president opened by joking: “I will say to the Cubs, it took you long enough. I mean, I’ve only got four days left.”

He called Maddon one of the coolest managers or coaches he has hosted and called Epstein one of the greatest sports executives.

“His job is to quench droughts,” Obama said. “He takes the reins of an organization that’s wandering in the wilderness; he delivers them to the promised land.

“I’ve talked to him about being DNC chair. But he decided wisely to stick to baseball.”

Epstein, who pointed out he’s under contract for five more years, chided the errors of Obama’s years of supporting the White Sox and granted him a “midnight pardon for all your indiscretions as a baseball fan.”

The Cubs then presented Obama with a No. 44 tile from the Wrigley Field scoreboard, a giant lifetime pass to Wrigley for his family, a “W” flag signed by the whole team and a No. 44 jersey. Hall of Famer Fergie Jenkins shouted from the crowd that Obama should put on the jersey.

At which point Obama shot him a look. And Epstein said to Obama, “It’s only one day.” He eventually relented for photos.

“This day’s up there with the best days I’ve ever had,” Anthony Rizzo said.

For the honor, team members said. For the laughter. And even for the weight of the timing.

Epstein took the chance on the first day he met the president to say “thank you for the dignity and integrity with which you’ve served this country for the last eight years and for your tremendous service to Chicago and Illinois before that and hosting us here today.”

And Obama took the chance to look at these Cubs players and talk about a different kind of foundation for sustained success:

“When you see this group of folks, of different shades and different backgrounds, coming from different communities and neighborhoods all across the country and then playing as one team and playing the right way and celebrating each other and being joyous in that, that tells us a little something about what America is and what America can be.”