President Barack Obama holds up a personalized Chicago Cubs baseball jersey presented to him by Anthony Rizzo, right, during a ceremony in the East Room of the White House in Washington, Monday, Jan. 16, 2017, where the president honored the 2016 World Series Champion baseball team. (AP Photo/Pablo Martinez Monsivais)

WASHINGTON (AP) — President Barack Obama celebrated the World Series champion Chicago Cubs on Monday and spoke about the power sports has to unite people.

“Throughout our history, sports has had this power to bring us together even when the country is divided,” Obama said at a White House ceremony for his hometown team. “Sports has changed attitudes and culture in ways that seem subtle but that ultimately made us think differently about ourselves.”

“It is a game and celebration,” he said, and noted that “there’s a direct line between Jackie Robinson and me standing here.” Robinson, a second baseman for the Brooklyn Dodgers, broke Major League Baseball’s color line to become its first black player.

The White House event came four days before Obama hands the presidency over to Donald Trump following one of the most divisive elections in recent memory.

It also follows a weekend in which civil rights icon John Lewis said he didn’t consider Trump a legitimate president because of Russian meddling in the election. Trump responded on Twitter by criticizing Lewis as “all talk” and suggesting the Democratic congressman take better care of his Georgia district.

Obama has a home in Chicago, but is a longtime White Sox fan. He rooted for the Cubs after the Sox failed to reach the playoffs.

His wife, first lady Michelle Obama, however, is a lifelong Cubs fan. She greeted Cubs players before the ceremony, which Obama noted was her first appearance at some of the roughly 50 events he has hosted for championship college and professional sports teams.

The Cubs gave Obama two baseball jerseys — home and away — with the number 44, among other gifts. Cubs first baseman Anthony Rizzo also wears the number, and Obama referred to Rizzo as “my fellow 44.” Obama is the nation’s 44th president.

Obama said it will be hard for him to wear the jersey, but told the Cubs: “Do know that among Sox fans I am the Cubs’ No. 1 fan.”

Hours after the Cubs won the series in November, Obama asked the team on Twitter if it wanted to visit the White House before his term ends Friday.

The World Series title was the first for the Cubs since 1908, and they won it by defeating the Cleveland Indians in seven games.