U.S. President Barack Obama isn't much of a rapper, but he knows how to act the part.

The POTUS helped stage actor Lin-Manuel Miranda with a freestyle rap in the White House's Rose Garden on Monday, holding cue-card signs with phrases written on them for Miranda to work into his rhymes. Obama also got into the groove of the rap session, waving his hands to the beat toward the end.

"Drop the beat," Obama says at the beginning of the video, which was tweeted from the White House's account on Monday night.

Miranda was at the White House with cast members from his latest Broadway show, "Hamilton," a mixtape-style musical based on the life of American Founding Father Alexander Hamilton.

Miranda, who is an accomplished stage performer and writer, sent out several tweets about his visit to the White House and time with Obama.

"I serve at the pleasure of the President," he quipped on Monday.