Former President Barack Obama inducted rapper Jay Z into the Songwriters Hall of Fame on Thursday.

"I like to think Mr. Carter and I understand each other," Obama said in a video message. "Nobody who met us as younger men would have expected us to be where we are today. We know what it's like not to have a father around. We know what it's like not to come from much, and to know people didn't get the same breaks that we did, so we try to prop open up those doors of opportunity so that it's a little easier for those who come up behind us to succeed as well."

"Jay and I are also fools for our daughters, although he's going to have me beat once those two twins show up. And let's face it, we both have wives who are significantly more popular than we are," Obama continued, referencing former first lady Michelle Obama and megastar Beyonce.

Beyonce and Jay Z are expecting twins.

"Jay, you have been inspiring, making me want to be active in my retirement just like you have been in yours," Obama continued.

Jay Z is the first rapper inducted into the Songwriters Hall of Fame.

The 21-time Grammy winner didn't attend the ceremony, but he did post a series of tweets to thank those who have inspired him, including Obama, the "greatest rapper of all time."

Other inductees in the class of 2017 include Kenneth "Baby Face" Edmonds, Berry Gordy, Jimmy Jam and Terry Lewis, Robert Lamm and James Pankow, P/K/A "Chicago" and Max Martin.