President Barack Obama Pranks Basketball Great Alonzo Mourning at the White House -- See the Pics!

Getty Images

The two just couldn't keep it together as photographers snapped away on Thursday.

As President Barack Obama prepares to pass the POTUS baton to his successor, he's showing America he's not leaving office without a smile -- or some pranks!

During an event to harvest the White House Kitchen Garden on the South Lawn of the White House in Washington, D.C., on Thursday, the 55-year-old politician hilariously photobombed former NBA All-Star Alonzo Mourning.

WATCH: Barack and Michelle Obama Are Total Relationship Goals on Their 24th Wedding Anniversary

While the 6'10" athlete, who is also a member of the President's Council on Fitness, was snapping pics with fans, Barack slyly walked behind him, throwing up a peace sign near his head to give him bunny ears.

Getty Images

But it was all in good fun, of course! Alonzo appeared to be having a blast at the event, laughing as photographers captured him and Barack joking alongside each other.

Getty Images

RELATED: President Obama Teams Up With NBA Star Stephen Curry For a PSA and It's Adorable

Meanwhile, Barack's wife, Michelle Obama, was busy teaching students who traveled across the country how to properly pull vegetables and greens from the garden she created back in 2009. FLOTUS was dressed appropriately in a pair of dark-wash jeans, a plaid button-up and olive green vest.

Getty Images

Joining Alonzo as guests were Sesame Street's Elmo and Rosita, NASA Astronaut Kjell Lindgren, NBC's Al Roker and Sam Kass, and Growing Power founder and CEO, Will Allen, who all posed for a group photo with the cheery group of kids.

Getty Images

NEWS: President Barack Obama Talks Emotional Final Months in Office

This marked the last harvest for the Obama era -- but Michelle has ensured that the garden won't disappear once the two leave the White House in 2017. According to NPR, The W. Atlee Burpee home gardening company and The Burpee Foundation have contributed $2.5 million to the National Park Foundation to maintain the garden for at least 17 years.

Last month, Barack and Michelle appeared on Essence magazine's October issue, and in the accompanying feature, the powerful couple got candid about their time in the White House.

"I can unequivocally say that America is better off now than we were when we came into office," Barack exclaimed. "By almost every economic measure, we’re better off. But having said that, we still have a lot of work to do."

WATCH: Michelle Obama Gives Emotional Speech About Raising Her Daughters in the White House