"Michelle and I send love and prayers to Vanessa and the entire Bryant family on an unthinkable day," Obama tweeted

“Kobe was a legend on the court and just getting started in what would have been just as meaningful a second act,” Obama, 58, tweeted later Sunday. “To lose Gianna is even more heartbreaking to us as parents.”

Get push notifications with news, features and more.

“Michelle and I send love and prayers to Vanessa and the entire Bryant family on an unthinkable day,” Obama continued.

Bryant was 41. Daughter Gianna, who went by “Gigi,” was 13. They were reportedly on the way to a youth basketball game.

Obama’s relationship with Bryant dates back years. Bryant visited Obama (a noted basketball fan) repeatedly in the White House, including in 2015 as Bryant prepared to retire from the L.A. Lakers.

“He and Obama talked at length about the end of the current chapters in their lives,” according to Politico.

Image zoom From left: Kobe Bryant talks with former First Lady Michelle Obama during the 2012 Summer Olympics Jesse D. Garrabrant/NBAE via Getty Images

A few years earlier, Bryant had picked the brains of some Obama staffers about their digital operation, Politico reported. And in 2014 he joined a White House effort to encourage people to enroll in the Affordable Care Act’s health care markets after a call from Obama’s chief of staff.

Bryant was also one of the NBA players invited to play basketball with Obama for the president’s 49th birthday, Obama’s brother-in-law, Craig Robinson, said in 2017.

“Kobe was hurt and he came anyway,” Robinson said in an interview at the time.

Bryant’s assessment of Obama’s basketball skills? He said in 2014 that Obama could make the Lakers’ roster — “it’s more of a sign of respect of the skill that the president possesses.” Obama reminded Bryant of “a left-handed version of Michael Adams.”

The following year, Nike released a shoe inspired by Bryant’s bond with Obama.

“Kobe has long looked up to the commander-in-chief, and not just because of his hoops game,” the company said then. “This unique collection symbolizes the President’s influence on Kobe with colors inspired by his Honolulu high school.”

Image zoom Former President Barack Obama (center) standing next to Kobe Bryant Chip Somodevilla/Getty Images

And in 2016, President Obama ended his last appearance at the White House Correspondents’ Dinner with a reference to how Bryant had recently concluded his last game with the Lakers.

“Haha!” Bryant tweeted in response.