During the final moments of a town hall in Ho Chi Minh City, Obama got a question from a 26-year-old rapper "Suboi," who spit a verse for the President after he offered to beatbox for her.
Suboi asked Obama about the role of the arts in international relations.
"I want to know how important it is for a nation to really help and promote their art and culture to help nations in the future," she asked.
Obama's answer was that artistic expression is important for helping people relate to each other.
"Music, poetry, representations of life as it is and how it should be -- those are the things that inspire people. And if I listen to a Vietnamese rap and it connects to the things I'm feeling, now I feel closer to a country on the other side of the world."
And because of that, Obama, who is on a diplomatic trip to several Asian countries, spoke against countries' efforts to suppress the arts.
"Let's be honest. Sometimes art is dangerous, though. And that's why governments sometimes get nervous about art," he said. "But one of the things I truly believe is if you try to suppress the arts, then I think you are suppressing the deepest dreams and aspirations of the people."
RELATED: Obama raises human rights in Vietnam
Suboi explained her lyrics which were in Vietnamese.
"I was just talking about how some people have a lot of money, have big houses but actually are they really happy?" she said.
Suboi also described the challenges she faces as an Asian woman in hip hop.
"They assume a lot of stereotypes," she said. "For Vietnamese people, it's different. They think rapping is not for girls."
Obama told her those concerns are not unique to Vietnam.
"That's true in the United States too," he said. "There's always been sexism and stereotypes in the music industry like every other part of life."