obama toast2
U.S. President Barack Obama raises a toast during a state dinner hosted by Kenyan President at the State House in Nairobi, Kenya, on July 25, 2015. Getty Images/Saul Loeb/AFP

U.S. President Barack Obama let loose Saturday during a state dinner in Kenya. As singers serenaded the assembled dignitaries, Obama buttoned his jacket and joined in as they started to dance. Then the rest of the head table joined in for what became a line dance. A laughing Obama then hugged his half-sister, Auma Obama.

Before the dancing began, the singers lamented the absence of first lady Michelle Obama, singing "Coming Home."

obama auna
U.S. President Barack Obama (2nd left) embraces his half-sister Auma Obama and is greeted by Kenyan President Uhuru Kenyatta (right) as he arrives aboard Air Force One at Jomo Kenyatta International Airport in Nairobi, July 24, 2015. Reuters/Jonathan Ernst

This isn't the first time Obama has cut loose. At the White House Correspondents Dinner in April, Obama delivered some of the funniest lines, including: “A few weeks ago, Dick Cheney [said] he thinks I’m the worst president of his lifetime. Which is interesting, because I think Dick Cheney is the worst president of my lifetime. Quite a coincidence.”

During toasts concluding Saturday's dinner, Kenyan President Uhuru Kenyatta described Obama as a president of historic consequence, an "engine to propel and transform the African continent."

Obama joked that some of his critics probably believe he went back to Kenya "to look for my birth certificate," adding, "That is not the case." Obama noted his father and Kenyatta's father knew each other. "It would have been hard for them to imagine how their sons might be sitting here today," Obama said.

obama toast
U.S. President Barack Obama (C) and Kenyan President Uhuru Kenyatta (left) share a toast at the end of a state dinner in Obama's honor at the State House in Nairobi, July 25, 2015. Reuters/Jonathan Ernst

The trip to Africa was in part a homecoming for Obama. He dined Friday night with members of his extended family and promised to return to Kenya. Obama, who first visited Kenya 30 years ago, has received some criticism for not making a trip to his father's home village this time around to pay tribute to his ancestors.

Saturday's dinner was hosted by Kenyatta at the State House. Security was tight for the event, which followed a series of meetings earlier in the day to promote increased investment in agriculture, infrastructure and energy production.

"I’m proud to return as the first U.S. president to ever visit Kenya while still in office," Obama said at a joint news conference with Kenyatta earlier in the day.

mama sarah
U.S. President Barack Obama's step-grandmother, Mama Sarah (center) attends a state dinner hosted by Kenyan President at the State House in Nairobi, July 25, 2015. Getty Images/Saul Loeb/AFP

Obama has one more day in Kenya before heading for Ethiopia. Early Sunday, he is to deliver remarks at Safaricom Indoor Arena, followed in the afternoon by a meeting with civil society leaders at the YALI Regional Leadership Center. Before departing for Addis Ababa, Ethiopia, Obama is to be interviewed on Capital FM, a local radio station in Nairobi.